# Copyright 2020-2021 Ian Jackson
PUBLISH_MD += pumpkin-books house-rules
-PUBLISH += pumpkin-books.pdf README.html
+PUBLISH += pumpkin-books.pdf index.html
PUBLISH += LICENCE.txt GPL-3.txt CC-BY-SA-4.0.txt
PUBLISH += $(addsuffix .md.txt, $(PUBLISH_MD))
PUBLISH += $(addsuffix .md.html, $(PUBLISH_MD))
BOOK_STEMS := $(addprefix book-,$(subst /, ,$(BOOKS)))
PUBLISH += $(addsuffix .pdf, $(BOOK_STEMS))
+PUBLISH += $(addsuffix .png, $(BOOK_STEMS))
all: $(PUBLISH)
book-%.eps: book-%.ps
rm -f $@; ps2eps $<
+book-%.png: book-%.eps Makefile
+ gm convert -density 150x150 $< $@
+
.PRECIOUS: book-%.eps
PUBLISH_FILES= \
$(patsubst %.md,%.md.txt, $(PUBLISH)) \
$(patsubst %.md,%.md.html, $(filter $(PUBLISH)) \
+index.html: gen-index README.html
+ ./$^ $(BOOK_STEMS) $o
+
%.md.txt: %.md
cat $< $o
experience this significantly overpowers blacks. We have not yet
found a good way to debuff them by about the right amount.
+<!-- book-* [delete]
+<h2>Pumpkin book images</h2>
+<a href="BOOK.pdf"><img src="BOOK.png"></a>
+ [delete] -->
+
<hr>
<address>
<p>
--- /dev/null
+#!/usr/bin/perl -w
+use strict;
+our $input = shift @ARGV;
+our @books = @ARGV;
+@ARGV=($input);
+
+while (<>) {
+ if (m{^\<\!-- book-\*\s} .. m{\s--\>\s*$}) {
+ if (m{\[delete\]}) {
+ next;
+ } elsif (m{BOOK}) {
+ my $orig = $_;
+ foreach my $book (@books) {
+ $_ = $orig;
+ s{\bBOOK\b}{$book}g;
+ print;
+ }
+ next;
+ }
+ }
+ print;
+}