Convert Microsoft Word (.docx) files to Markdown format with a simple CLI.
pip install doc2markdownOr install from source:
git clone https://github.com/yourusername/doc2markdown.git
cd doc2markdown
pip install .# Convert a file (output uses same name with .md extension)
doc2markdown document.docx
# Specify output file
doc2markdown document.docx output.md
# Overwrite existing output file
doc2markdown document.docx -wBoth doc2markdown and docx2markdown commands are available:
docx2markdown document.docx- Headings — Converts H1–H6 styles to
#headers - Inline formatting — Bold (
**), italic (*), and code (`) preserved - Lists — Bullet and numbered lists converted
- Tables — Markdown table syntax with header row and separators
- Block quotes — Styled as
>blockquotes
- Python 3.10+
click≥ 8.0python-docx≥ 1.0
MIT License - feel free to modify and extend!