summaryrefslogtreecommitdiff
path: root/download-chapters.sh
blob: 29a27583198ea69735e02215f8244cb04fcecf47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

mkdir -p chapters/

cat book-list | while read buch
do
	mkdir -p "chapters/$buch"
	./parse-chapter.sed "books/$buch" | \
		while read url
		do
			read number
			echo $url

			echo "$buch $number"
			buchdir=$(echo "$buch" | sed "s/ /_/g")
			curl $url > "chapters/$buchdir/$number.html"
		done
done