Skip to content

Instantly share code, notes, and snippets.

@thelibrarian
Created November 19, 2010 02:13
Show Gist options
  • Save thelibrarian/706035 to your computer and use it in GitHub Desktop.
Save thelibrarian/706035 to your computer and use it in GitHub Desktop.
Convert a docfile to a stripped html file (body only, no styling)
textutil -convert html -excludedelements "(head, body, html, xml, font)" -stdout Abst_1.doc | sed -e 's/ style="[^"]*"//g' -e 's/b>/strong>/g' -e 's/i>/em>/g' -e '/<p><br><\/p>/d' > $(echo 'Abst_1.doc' | sed 's/\.doc$/.html/')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment