Thursday, June 4, 2015

textutil in Mac OS X

Lynx had a useful option to convert html pages to text. 
lynx -dump input.html > output.txt
And I miss that on Mac OSX. I stumbled upon an alternative for this - textutil. It comes bundled with MAC OS X. Converting an html file to text can be done in this way:
textutil -convert txt ~/Downloads/your-fav-profile.html

There should be a file created: ~/Downloads/your-fav-profile.txt

RTFM. Textutil is a utility extracted from the Cocoa text system 

No comments:

Post a Comment