How can doc/docx files be converted to markdown or structured text?

后端 未结 11 860
难免孤独
难免孤独 2021-01-29 21:45

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

11条回答
  •  温柔的废话
    2021-01-29 22:34

    You can use Word to Markdown (Ruby Gem) to convert it in one step. Conversion can be as simple as:

    $ gem install word-to-markdown
    $ w2m path/to/document.docx
    

    It routes the document through LibreOffice, but also does it best to semantice headings based on their relative font size.

    There's also a hosted version which would be as simple as drag-and-drop to convert.

提交回复
热议问题