Metadata-Version: 2.4
Name: html2msoffice
Version: 0.2.0
Summary: Convert HTML documents to Microsoft Word (.docx), PowerPoint (.pptx) and Excel (.xlsx) files.
Author: Robert Helewka
License: MIT License
        
        Copyright (c) 2026 r
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 
        associated documentation files (the "Software"), to deal in the Software without restriction, including 
        without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
        copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the 
        following conditions:
        
        The above copyright notice and this permission notice shall be included in all copies or substantial 
        portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 
        LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO 
        EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 
        IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 
        USE OR OTHER DEALINGS IN THE SOFTWARE.
        
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: python-docx
Requires-Dist: python-pptx>=0.6.21
Requires-Dist: beautifulsoup4>=4.12.0
Requires-Dist: lxml>=4.9.0
Requires-Dist: click>=8.1.0
Requires-Dist: cssutils>=2.7.0
Requires-Dist: cairosvg>=2.7.0
Requires-Dist: pillow>=10.0
Requires-Dist: openpyxl<4,>=3.1
Dynamic: license-file

# html2msoffice

Convert agent-authored HTML into native PowerPoint (`.pptx`), Word (`.docx`)
and Excel (`.xlsx`) files, styled by a branded Office template.

```bash
# 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](docs/html2msoffice.md) — architecture,
layout engine, charts, and how to work on the code.

Authoring contracts for agents:
[slides](docs/HTML_SLIDE_FORMAT.md) ·
[documents](docs/HTML_DOCUMENT_FORMAT.md) ·
[workbooks](docs/HTML_WORKBOOK_FORMAT.md) ·
[icons](docs/ICON_LIBRARY.md)

> Client decks stay out of this repo. `.gitignore` blocks working HTML at the
> repo root; test fixtures live in `tests/` and must be generic.
