Skip to content

Instantly share code, notes, and snippets.

@richbodo
Created September 21, 2015 21:17
Show Gist options
  • Save richbodo/d9b104d15d30527c1ed2 to your computer and use it in GitHub Desktop.
Save richbodo/d9b104d15d30527c1ed2 to your computer and use it in GitHub Desktop.
When converting html2text, use Aaron Schwartz's awesome html2text and bash
#!/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