Hacker News new | ask | show | jobs
by peterburkimsher 1779 days ago
The QuickLook backend is really convenient for having a parser to turn everything into HTML (and therefore text).

I wrote an AppleScript to convert DOCX or PPTX to TXT using qlmanage -p | textutil

Using QuickLook to turn anything to HTML:

http://hints.macworld.com/article.php?story=2010071209045151...

Using textutil to convert HTML to TXT:

https://stackoverflow.com/a/32621215

AppleScript source code: https://pastebin.com/JRbXTv8d