Created
August 2, 2015 12:02
-
-
Save ilyakava/47aedca7bc39483d7a94 to your computer and use it in GitHub Desktop.
Input an arg of a file of a list of links, get an output.epub of all those webpages concatenated
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
COUNT=1 | |
for link in $(cat $1) | |
do | |
wget -O - -o /dev/null $link | iconv -f iso8859-1 -t utf-8 > $COUNT.html | |
COUNT=$(echo $COUNT + 1 |bc) | |
done | |
pandoc $(ls -1 *html | sort -n) -o output.epub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment