diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-07-02 16:30:05 +0200 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-07-02 16:30:05 +0200 |
commit | 7b9ff5843a6addd3139efe4bfe958fd332823fde (patch) | |
tree | 92b66602b7756c9fb07e4087fea802e23041c8c6 | |
parent | 9cd02dc1053893f09fbf856d591248a8e4953ebe (diff) | |
download | bible-fetch-7b9ff5843a6addd3139efe4bfe958fd332823fde.tar.gz bible-fetch-7b9ff5843a6addd3139efe4bfe958fd332823fde.tar.bz2 bible-fetch-7b9ff5843a6addd3139efe4bfe958fd332823fde.zip |
Add html suffix to downloaded chapter files
-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 |