%.md.txt: %.md
cat $< $o
-title=-Mtitle='$(shell head -1 $<)'
-
-%.md.html: %.md Makefile
- pandoc $(title) -s $< $o
+%.md.html: %.md Makefile massage-html
+ pandoc -s -Mtitle='Fm4YNbKyBNiS7TNu' $< >$@.tmp
+ ./massage-html $< $@.tmp $o
%.md.pdf: %.md Makefile
- pandoc --pdf-engine=wkhtmltopdf -o $@ $<
+ perl -pe '$$_ = uc if $$.==1' <$< >$@.tmp
+ pandoc --pdf-engine=wkhtmltopdf -o $@ $@.tmp
pubssh=c
pubpath=games-rules/quacks
--- /dev/null
+#!/usr/bin/perl -wp
+use strict;
+our $ttitle;
+our $utitle;
+BEGIN {
+ my $md = shift @ARGV // die;
+ open M, '<', $md or die "$md: $!";
+ $ttitle = <M>;
+ chomp $ttitle;
+ $ttitle =~ s{^\%\s+}{} or die;
+ $utitle = "$ttitle - Quacks Books of Pumpkins";
+}
+s{Fm4YNbKyBNiS7TNu}{
+ my $r = $utitle;
+ $utitle = uc $ttitle;
+ $r =~ s{\&}{&};
+ $r =~ s{\<}{<};
+ $r =~ s{\>}{>};
+ $r
+}ge;
-Books involving pumpkins
-========================
+% Books involving pumpkins
+
*** NB see pumpkin-books.pdf to see which ones have been playtested ***