MCPcopy Index your code
hub / github.com/erezlife/html2docx

github.com/erezlife/html2docx @1.4.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.4.1 ↗ · + Follow
72 symbols 286 edges 10 files 4 documented · 6% updated 2y ago1.4.1 · 2021-08-10★ 385 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

html2docx

html2docx converts valid HTML input to docx output. The project is distributed under the MIT license.

Installing

To install, use pip:

$ pip install html2docx

Usage

from html2docx import html2docx

with open("my.html") as fp:
    html = fp.read()

# html2docx() returns an io.BytesIO() object. The HTML must be valid.
buf = html2docx(html, title="My Document")

with open("my.docx", "wb") as fp:
    fp.write(buf.getvalue())

Testing

To run the test suite, use tox:

$ tox

Core symbols most depended-on inside this repo

load_image
called by 15
html2docx/image.py
image_size
called by 14
html2docx/image.py
generate_image
called by 14
tests/utils.py
init_run
called by 9
html2docx/html2docx.py
get_attr
called by 7
html2docx/html2docx.py
style_to_css
called by 2
html2docx/html2docx.py
_reset
called by 2
html2docx/html2docx.py
finish_p
called by 2
html2docx/html2docx.py

Shape

Function 45
Method 21
Class 6

Languages

Python100%

Modules by API surface

tests/conftest.py17 symbols
html2docx/html2docx.py17 symbols
tests/test_image_size.py15 symbols
tests/test_load_image.py14 symbols
html2docx/image.py5 symbols
tests/test_html2docx.py2 symbols
tests/utils.py1 symbols
html2docx/__init__.py1 symbols

For agents

$ claude mcp add html2docx \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page