all: dict.2 links headers james john Don_Quixote.en.ss Don_Quixote.es.ss

dict.1: diction.htm.gz
	<$< gunzip -c | ./dict_html2txt >$@
dict.2: dict.1
	<$< grep -v ': *$$' >$@
links: diction.htm.gz
	<$< gunzip -c | grep -ai '<A' >$@
headers: dict
	<$< sed 's/: .*//; s/:$$//' | grep -v '^$$' | uniqo >$@

james: james.tty
	<$< ./tidy-bible-tty.sh >$@
john: john.tty
	<$< ./tidy-bible-tty.sh >$@

Don_Quixote.en.txt: pg996.txt
	<$< sed -n '/SOME COMMENDATORY VERSES/,$${ /Project Gutenberg/q; p; }' >$@
Don_Quixote.es.txt: 2000.txt.utf8
	<$< sed -n '/El ingenioso hidalgo don Quijote de la Mancha/,$${ /Project Gutenberg/q; p; }' >$@
%.ss: %.txt
	<$< tr -d '\r' | ./pg2line | ./splitsentences3 >$@
