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

后端 未结 11 986
难免孤独
难免孤独 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

    Word to Markdown might be worth a shot, or the procedure described here using Calibre and Pandoc via HTMLZ, here's a bash script they use:

    #!/bin/bash
    mkdir temp
    cp $1 temp
    cd temp
    ebook-convert $1 output.htmlz
    unzip output.htmlz
    cd ..
    pandoc -f html -t markdown -o output.md temp/index.html
    rm -R temp
    

提交回复
热议问题