Skip to main content

Markdown2docx

Table of Contents

Purpose

Markdown2docx will take a plain text markdown document and create a Word .docx file.

Minimal Usage

from Markdown2docx import Markdown2docx
project = Markdown2docx('README')
project.eat_soup()
project.save()

You can optionally save a copy in HTML format alongside the .docx output, and print out the default styles.

from Markdown2docx import Markdown2docx
project = Markdown2docx('README')
project.eat_soup()
project.write_html()  # optional
print(type(project.styles()))
for k, v in project.styles().items():
    print(f'stylename: {k} = {v}')
project.save()

default styles

These are the default styles applied to the document:

  • stylename: style_table = {'Medium Shading 1 Accent 3'}
  • stylename: style_quote = {'Body Text'}
  • stylename: style_body = {'Body Text'}
  • stylename: style_quote_table = {'Table Grid'}
  • stylename: toc_indicator = {'contents'}

Token substitution and commands

For details about token substitution, refer to hello.md

Create a table of contents.

The TOC will be inserted on the first and only the first match where a paragraph contains the TOC indicator. By default this is literally the word 'contents'. When the user opens the .docx document, it will display 'Right-click to update field.'

For developers.

Use a virtualenv. For extra dev tools, use:

bash
$ pip install -e .[dev]

Release files for Markdown2docx 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Markdown2docx 0.1.0
File Size Uploaded
Markdown2docx-0.1.0.tar.gz 402.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Markdown2docx 0.1.0
File Interpreter ABI Platform
Markdown2docx-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 410.9 kB

Release files / Markdown2docx-0.1.0.tar.gz

Download URL Markdown2docx-0.1.0.tar.gz
Size 402.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a3a54f75be046e662630c7f2eb570d45cc98ada9892f17e84583db24c10a7510
BLAKE2b-256 checksum
How to use checksums
dd26beba8114665a25e7e643a580d6d9f5e5330eff9f14ee94c6d49532e19ac3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

Release files / Markdown2docx-0.1.0-py3-none-any.whl

Download URL Markdown2docx-0.1.0-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
026504ec82b59b9de2641366157fe11d5f3c4781b28cf6422460126dbbec7472
BLAKE2b-256 checksum
How to use checksums
a8b4f8c36f73e7cad102ea084b076283e5aab099cb36955b0faa81b5285f0e44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page