News for hackers. Stuff that matters.
Re:OS X Command Line Utilities by cstross on Thursday May 15, 2014 @04:28AM (#7748361)
One command I can't live without: textutil.

Basically it's a command-line front end to Apple's TextKit file import/export library. Works with a bunch of rich text/word processor formats, including OpenDoc, RTF, HTML 5, and MS Word. Critically, the HTML it emits is vastly better than the bloated crap that comes out of Microsoft Word or LibreOffice when you save as HTML ...

Install pandoc and multimarkdown as well and you've got the three pillars of a powerful, easy-to-use multiformat text processing system.

Re:OS X Command Line Utilities by mitchchn on Thursday May 15, 2014 @06:11AM (#7748638)
Pandoc and multimarkdown are the greatest. I've never found a way to fit textutil into that workflow, though. Is there anything it can do that pandoc can't by itself?
Re:OS X Command Line Utilities by cstross on Thursday May 15, 2014 @06:54AM (#7748730)
Textutil handles a couple of apple-specific file formats (rtfd, webarchive) that do an embrace-and-extend on open(ish) standards.

(Annoyingly it doesn't provide a way to get at the guts of Apple's own Pages files. Which sucks because the only tools for transcoding Pages are Pages itself, and icloud.com.)

Re:OS X Command Line Utilities by mitchchn on Saturday May 17, 2014 @04:39PM (#7760987)
Thanks! I played with this last night and wrote about it in my followup: http://www.mitchchn.me/2014/and-eight-hundred-more/