html2msoffice (0.2.0)
Installation
pip install --index-url https://git.helu.ca/api/packages/r/pypi/simple/ --extra-index-url https://pypi.org/simple html2msofficeAbout this package
Convert HTML documents to Microsoft Word (.docx), PowerPoint (.pptx) and Excel (.xlsx) files.
html2msoffice
Convert agent-authored HTML into native PowerPoint (.pptx), Word (.docx)
and Excel (.xlsx) files, styled by a branded Office template.
# Icons are rasterized with cairosvg, which binds to the *system* cairo
# library at runtime -- pip cannot supply it.
sudo apt install libcairo2 # Debian/Ubuntu
brew install cairo # macOS
pip install -e .
html2pptx deck.html -o deck.pptx -t NTTDATA_LIGHT.pptx
html2docx doc.html -o doc.docx -t NTTDATA_DOCX.docx
html2xlsx book.html -o book.xlsx
Without libcairo, everything still converts — icons and badges are skipped
with a warning (no library called "cairo-2" was found). The xlsx renderer
never touches cairo at all.
Output is real Office objects — editable text boxes, tables and shapes — not images of a web page. The converter applies no styling of its own: fonts come from the template's theme, colours from the authored CSS.
Start here: docs/html2msoffice.md — architecture, layout engine, charts, and how to work on the code.
Authoring contracts for agents: slides · documents · workbooks · icons
Client decks stay out of this repo.
.gitignoreblocks working HTML at the repo root; test fixtures live intests/and must be generic.