Converting JA HTML to TXT

This commit is contained in:
William Kendrick 2014-08-19 06:54:17 +00:00
parent b051ebf5df
commit 409e13f0eb
2 changed files with 663 additions and 2 deletions

View file

@ -14,15 +14,28 @@
LINKS_OPTIONS:=-dump
LINKS:=links $(LINKS_OPTIONS)
LYNX_OPTIONS:=-dump
LYNX:=lynx $(LYNX_OPTIONS)
# FIXME: Support finding files in ??/html/ and ??_??/html/)
HTMLFILES:=$(wildcard html/*.html)
TEXTFILES:=$(patsubst html/%.html,%.txt,$(HTMLFILES))
JA_HTMLFILES:=$(wildcard ja/html/*.html)
JA_TEXTFILES:=$(patsubst ja/html/%.html,ja/%.txt,$(JA_HTMLFILES))
.PHONY: all
all: $(TEXTFILES)
all: $(TEXTFILES) \
$(JA_TEXTFILES)
.PHONY: clean
clean:
-rm $(TEXTFILES)
-rm $(JA_TEXTFILES)
$(TEXTFILES): %.txt: html/%.html
$(LINKS) $< > $@
$(JA_TEXTFILES): ja/%.txt: ja/html/%.html
$(LYNX) $< > $@