Skip to main content

docx (OOXML) to html converter

Project description

docx2html

Convert a docx (OOXML) file to html

Usage

>>> from docx2html import convert
>>> html = convert('path/to/docx/file')

Running Tests

$ ./run_tests.sh

Description

docx2html is designed to take a docx file and extract the content out and convert that content to html. It does not care about styles or fonts or anything that changes how the content is displayed (with few exceptions). Below is a list of what currently works:

  • Paragraphs
    • Bold

    • Italics

    • Underline

    • Hyperlinks

  • Lists
    • Nested lists

    • List styles (letters, roman numerals, etc.)

  • Tables
    • Rowspans

    • Colspans

    • Nested tables

    • Lists

  • Images
    • Resizing

    • Converting to smaller formats (for bitmaps and tiffs)

    • There is a hook to allow setting the src of the image tag out of context, more on this later

  • Headings
    • Simple headings

    • Root level lists that are upper case roman numerals get converted to h2 tags

Project details


Download files

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

Source Distribution

docx2html-0.0.6.tar.gz (235.4 kB view details)

Uploaded Source

File details

Details for the file docx2html-0.0.6.tar.gz.

File metadata

  • Download URL: docx2html-0.0.6.tar.gz
  • Upload date:
  • Size: 235.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for docx2html-0.0.6.tar.gz
Algorithm Hash digest
SHA256 2163543d8c1cf2a35b1151ff1265f30542e01a367486f28743c7bc6624d7cc14
MD5 98df3e79f7aa783be21d341c2aea60ed
BLAKE2b-256 536d71247efd3bd8a5058f200446e4193d9d489989ae1af6ed15d17e03f490a5

See more details on using hashes here.

Supported by

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