Convert valid HTML input to docx
Project description
# 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
```py
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
```
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
```py
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
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
html2docx-1.0.0.tar.gz
(6.2 kB
view hashes)
Built Distribution
Close
Hashes for html2docx-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8db17947a7887cc4a5df40e996514ebcf724175a2797cdd93976f6fd833014c2 |
|
MD5 | 2e4a724ff2c3f63bf4ab93154d3da64e |
|
BLAKE2b-256 | f337cea914f05ee04a437ff675fb4d4afd6a175565fc5f45325a7eb0d5a67926 |