diff options
-rw-r--r-- | Makefile | 4 | ||||
-rwxr-xr-x | concat.sh | 2 | ||||
-rwxr-xr-x | download-chapters.sh | 2 | ||||
-rwxr-xr-x | list-chapters.sh | 4 |
4 files changed, 6 insertions, 6 deletions
@@ -1,9 +1,9 @@ CHAPTERS=$(shell ./list-chapters.sh) -CHAPTERS_XML=$(CHAPTERS:=.xml) +CHAPTERS_XML=$(CHAPTERS:.html=.xml) all: book-list elberfelder2006.zip -chapters/%.xml: chapters/% convert.sed convert.xsl +chapters/%.xml: chapters/%.html convert.sed convert.xsl ./convert.sed $< | xsltproc --encoding utf-8 --html convert.xsl - > $@ elberfelder2006.xml: $(CHAPTERS_XML) @@ -13,7 +13,7 @@ do buchdir=$(echo "$buch" | sed "s/ /_/g") i=1 - while [ -e "chapters/$buchdir/$i" ] + while [ -e "chapters/$buchdir/$i.xml" ] do cat "chapters/$buchdir/$i.xml" | sed 1d i=$((i+1)) diff --git a/download-chapters.sh b/download-chapters.sh index facaeeb..29a2758 100755 --- a/download-chapters.sh +++ b/download-chapters.sh @@ -13,6 +13,6 @@ do echo "$buch $number" buchdir=$(echo "$buch" | sed "s/ /_/g") - curl $url > "chapters/$buchdir/$number" + curl $url > "chapters/$buchdir/$number.html" done done diff --git a/list-chapters.sh b/list-chapters.sh index df0f241..f09ce7f 100755 --- a/list-chapters.sh +++ b/list-chapters.sh @@ -4,9 +4,9 @@ cat book-list | while read buch do i=1 buchdir=$(echo "$buch" | sed "s/ /_/g") - while [ -e "chapters/$buchdir/$i" ] + while [ -e "chapters/$buchdir/$i.html" ] do - echo "chapters/$buchdir/$i" + echo "chapters/$buchdir/$i.html" i=$((i+1)) done done |