From: Ian Jackson Date: Wed, 27 Oct 2021 11:37:03 +0000 (+0100) Subject: publish html X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=939820cb31ca31eb0cc5c9731c0a869d4f4a50d0;p=quacks.git publish html --- diff --git a/.gitignore b/.gitignore index 8efe0f5..2dc9fcb 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ pumpkin-books.pdf bag.pgm pot.pgm *.tmp.* +*.md.txt +*.md.html diff --git a/Makefile b/Makefile index fd42c30..17465b0 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,12 @@ -PUBLISH= pumpkin-books.pdf pumpkin-books.md house-rules.md +PUBLISH_MD += pumpkin-books house-rules +PUBLISH += pumpkin-books.pdf +PUBLISH += $(addsuffix .md.txt, $(PUBLISH_MD)) +PUBLISH += $(addsuffix .md.html, $(PUBLISH_MD)) SHELL=bash -all: pumpkin-books.pdf +all: $(PUBLISH) # Don't print the ps, printers (eg ours!) don't always have the fonts @@ -41,6 +44,16 @@ droplet.ppm: droplet.svg Makefile | pnmdepth 255 \ | $(make_pnm) +PUBLISH_FILES= \ + $(patsubst %.md,%.md.txt, $(PUBLISH)) \ + $(patsubst %.md,%.md.html, $(filter $(PUBLISH)) \ + +%.md.txt: %.md + cat $< $o + +%.md.html: %.md Makefile + pandoc -s $< $o + pubssh=c pubpath=games-rules/quacks puburl=https://www.chiark.greenend.org.uk/~ijackson/