Convert Many Word Documents to Markdown
September 8, 2013 9:15 PM Subscribe
I have a directory full of many Word documents. Some of them are .doc and some are .docx files. Is there some way to convert them all to Markdown without doing it one-by one? (I have both a Mac laptop running 10.7 and a desktop running Windows 8.)
Response by poster: That looks good but what about .docx files? What about multiple files? I'm new to the command line but would something like this work (to convert all .docx files in the current directory into .md files with the same name as the original)?
$ textutil -convert html *.docx -stdout | pandoc -f html -t markdown -o *.md
From what I can see, textutil doesn't understand .docx files. Is that right?
posted by dylan_k at 2:43 PM on September 9, 2013
$ textutil -convert html *.docx -stdout | pandoc -f html -t markdown -o *.md
From what I can see, textutil doesn't understand .docx files. Is that right?
posted by dylan_k at 2:43 PM on September 9, 2013
Best answer: I have discovered a utility called Pandoc that has offered one solution to my problem, in addition to the one posted here. I've collected a few scripts to help with this and similar tasks, here: https://github.com/dylan-k/Palabra/tree/master/scripts
posted by dylan_k at 1:25 PM on December 3, 2013 [1 favorite]
posted by dylan_k at 1:25 PM on December 3, 2013 [1 favorite]
This thread is closed to new comments.
posted by srboisvert at 9:27 PM on September 8, 2013 [3 favorites]