Skip to main content

convert .docx to .md

Project description

docx2md


Converts Microsoft Word document files (.docx extension) to Markdown

files.

Install


pip install docx2md

How to use


usage: python -m docx2md [-h] [-m] [-v] [--debug] SRC.docx DST.md



positional arguments:

  SRC.docx        Microsoft Word file to read

  DST.md          Markdown file to write



optional arguments:

  -h, --help      show this help message and exit

  -m, --md_table  use Markdown table notation instead of <table>

  -v, --version   show version

  --debug         for debug

Tables


A table is output as <table id="table(n)">. id is the order of

output, starting from 1.

If --md_table is specified, the output will use |, but the title

line item will be # fixed.

| # | # | # |

|---|---|---|

|a|b|c|

|d|e|f|

|g|h|i|

Pictures


Images will be output as <img id="image(n)">. The id is output

in order starting from 1.

Examples


Elements that can be converted


  • Tables (including merged cells)

  • Lists (also with numbers as bullets)

  • Headings

  • Embedded images

  • Page breaks (converted to <div class="break"></div>)

  • Line breaks within paragraphs (converted to <br>)

  • Text boxes (inserted in the body)

Elements that cannot be converted (only known ones)


  • Table of Contents

  • Text decoration (bold and etc…)

License


MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

docx2md-1.0.1-py3-none-any.whl (8.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page