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

translation=$1

mkdir -p ${translation}/
rm -rf ${translation}/books/
mkdir ${translation}/books
echo -n > ${translation}/book-list

curl -s http://www.die-bibel.de/online-bibeln/${translation}/bibel/bibeltext/ | \
	./parse-book.sed | \
	while read url
	do
		read book
		book=$(echo $book | sed s:/.*$:: )
		echo $book
		echo $book >> ${translation}/book-list
		curl $url > "${translation}/books/$book"

	done