Makefile (2076B)
1 default: output/klaanon.html output/klaanon1.html output/klaanon2.html output/klaanon3.html output/klaanon4.html output/klaanon5.html output/klaanon6.html index.html style.css 2 cp index.html output/ 3 cp style.css output/ 4 5 .PHONY: epub 6 epub: output/klaanon.epub 7 8 output/klaanon.html: klaanon.json header.html foot.html 9 ./json_parse.sh > content.html 10 cat header.html content.html foot.html > output/klaanon.html 11 rm content.html 12 13 output/klaanon.epub: output/content.md title.txt 14 pandoc -o output/klaanon.epub title.txt output/content.md 15 16 output/content.md: klaanon.json 17 jq -r 'def time: . | strptime("%Y-%m-%dT%H:%M")|mktime|strflocaltime("%d.%m.%Y"); .posts | .[] | "<h1>\(.creator)</h1><div class=\"timestamp\">\(.timestamp|time)</div><p>\(.content)</p>"' klaanon.json > linkless.html 18 pandoc linkless.html -o output/content.md 19 rm linkless.html 20 21 output/klaanon1.html: klaanon.json header.html foot.html 22 ./json_parse.sh ".id < 250" > content1.html 23 cat header.html content1.html foot.html > output/klaanon1.html 24 rm content1.html 25 26 output/klaanon2.html: klaanon.json header.html foot.html 27 ./json_parse.sh ".id >= 250 and .id < 500" > content2.html 28 cat header.html content2.html foot.html > output/klaanon2.html 29 rm content2.html 30 31 output/klaanon3.html: klaanon.json header.html foot.html 32 ./json_parse.sh ".id >= 500 and .id < 750" > content3.html 33 cat header.html content3.html foot.html > output/klaanon3.html 34 rm content3.html 35 36 output/klaanon4.html: klaanon.json header.html foot.html 37 ./json_parse.sh ".id >= 750 and .id < 1000" > content4.html 38 cat header.html content4.html foot.html > output/klaanon4.html 39 rm content4.html 40 41 output/klaanon5.html: klaanon.json header.html foot.html 42 ./json_parse.sh ".id >= 1000 and .id < 1250" > content5.html 43 cat header.html content5.html foot.html > output/klaanon5.html 44 rm content5.html 45 46 output/klaanon6.html: klaanon.json header.html foot.html 47 ./json_parse.sh ".id >= 1250 and .id < 1500" > content6.html 48 cat header.html content6.html foot.html > output/klaanon6.html 49 rm content6.html 50 51 .PHONY: clean 52 clean: 53 rm output/*