Is there a program or workflow to convert .doc
or .docx
files to Markdown or similar text?
PS: Ideally, I would welcome the option that a spec
Mammoth is best known as a Word to HTML converter but it now supports a Markdown writer module. When I last checked, Mammoth Markdown support was still in its early stages, so you may find some features are unsupported. As usual ... check the website for the latest details.
To use the Javascript version ... install NodeJS and then install Mammoth:
npm install -g mammoth
Command line to convert a Word document to Markdown ...
mammoth document.docx --output-format=markdown
NodeJS API to convert to Markdown ...
var mammoth = require("mammoth");
mammoth.convertToMarkdown({path: "path/to/document.docx"});
Mammoth Markdown writer currently supports:
The Mammoth command line tools and API have been ported to several languages:
With NO Markdown (May 2016):
With Markdown: