-
-
Save lssimoes/83598cdafff2a2f16ae0 to your computer and use it in GitHub Desktop.
Download homiliae from vatican and save as html
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 | |
link=$1 | |
if [[ ! -n $1 ]] | |
then | |
link=http://w2.vatican.va/content/francesco/pt/apost_letters/documents/papa-francesco_bolla_20150411_misericordiae-vultus.html | |
fi | |
curl $link > .tp1 | |
cat .tp1 | | |
#sed 's/« /""/g' | sed 's/ »/"/g' | | |
recode html..utf-8 | | |
sed 's/â/–/g' | | |
sed -e '/<!-- \/CONTENUTO DOCUMENTO -->/q' | | |
tac | sed -e '/<!-- CONTENUTO DOCUMENTO -->/q' | | |
sed "s/â/\"/g" | | |
sed "s/â/\"/g" > tp2.html | |
echo -e "\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">" >> tp2.html | |
cat tp2.html | tac | sed 's/â^À¦/.../g' > page.html | |
rm tp2.html .tp1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment