diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 28 |
1 files changed, 22 insertions, 6 deletions
@@ -4,6 +4,8 @@ INPUT=2025-07-01T2031_NB_generated.pdf # ocrmypdf -l nor --force-ocr --sidecar $(pwd)/sidecar.txt $(pwd)/2025-07-01T2031_NB_generated.printed.pdf $(pwd)/2025-07-01T2031_NB_generated.ocr.pdf +MAKEFLAGS += -r + all: constance-ring.epub JPGs:=$(wildcard image/*.jpg) @@ -49,18 +51,32 @@ stage-4.txt: stage-3.txt Makefile stage-5.txt: stage-4.txt convert2.awk @echo '#' $@ awk -f convert2.awk $< > $@.tmp - mv $@.tmp $@ + @mv $@.tmp $@ -stage-6.md spellcheck-words: stage-5.txt Makefile +stage-6.md: stage-5.txt Makefile @echo '#' $@ @pandoc --from markdown -o $@.tmp.md $< @mv $@.tmp.md $@ - @echo spellcheck - @hunspell -p dict -d nb_NO -l < $@ | sort | uniq -c | sort -n > spellcheck-words -constance-ring.epub: header.md stage-6.md +# This actually updates dict by sorting and removing leading numbers/spaces. +dict.tmp: dict + cat dict |\ + sed "s,^[0-9 ]*,," |\ + sort |\ + grep -v "^$$" |\ + uniq > dict.tmp && cp dict.tmp dict + +spellcheck: stage-6.md + hunspell -p dict -d nb_NO stage-6.md dict.tmp + +spellcheck-words: stage-6.md dict.tmp + @echo hunspell + hunspell -p dict -d nb_NO -l < $< | sort | uniq -c | sort -n > $@.tmp + @mv $@.tmp spellcheck-words + +constance-ring.epub: header.md stage-6.md spellcheck-words @echo '#' $@ - @pandoc --toc -o $@ $^ + @pandoc --toc -o $@ $(filter %.md,$^) .PHONY: clean clean: |
