GithubHelp home page GithubHelp logo

docx2md-1's Introduction

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

docx2md-1's People

Contributors

dogatana avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.