Created
September 21, 2015 21:17
-
-
Save richbodo/d9b104d15d30527c1ed2 to your computer and use it in GitHub Desktop.
When converting html2text, use Aaron Schwartz's awesome html2text and bash
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 | |
# to convert a bunch of html files to text, | |
# use Aarons excellent https://github.com/aaronsw/html2text ! | |
for i in *.html; do | |
echo $i | |
j=`echo $i | sed -e 's/ /_/g'` | |
echo $j | |
mv "$i" "$j" | |
html2text $j > `echo $j | sed -e 's/\.html/\.txt/g'` | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment