# unmhtml
Convert MHTML files to standalone HTML with embedded CSS and resources.
## Installation
```bash
pip install unmhtml
```
## Usage
```python
from unmhtml import MHTMLConverter
# Convert MHTML file to HTML
converter = MHTMLConverter()
html_content = converter.convert_file('saved_page.mhtml')
# Save as standalone HTML
with open('output.html', 'w') as f:
f.write(html_content)
```
## Features
- **Pure Python** - No external dependencies, uses only standard library
- **Standalone HTML** - Embeds CSS and converts resources to data URIs
- **Graceful degradation** - Handles malformed MHTML files
- **Memory efficient** - Processes large files without excessive memory usage
## Requirements
- Python 3.8+
## License
MIT
Raw data
{
"_id": null,
"home_page": null,
"name": "unmhtml",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "archive, converter, html, mhtml, mime, web",
"author": "Johan Schuijt",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/5e/73/eb051db145d2df781ae30f12ac85026a039d5e612c66981207c792a04f4b/unmhtml-0.1.0.tar.gz",
"platform": null,
"description": "# unmhtml\n\nConvert MHTML files to standalone HTML with embedded CSS and resources.\n\n## Installation\n\n```bash\npip install unmhtml\n```\n\n## Usage\n\n```python\nfrom unmhtml import MHTMLConverter\n\n# Convert MHTML file to HTML\nconverter = MHTMLConverter()\nhtml_content = converter.convert_file('saved_page.mhtml')\n\n# Save as standalone HTML\nwith open('output.html', 'w') as f:\n f.write(html_content)\n```\n\n## Features\n\n- **Pure Python** - No external dependencies, uses only standard library\n- **Standalone HTML** - Embeds CSS and converts resources to data URIs\n- **Graceful degradation** - Handles malformed MHTML files\n- **Memory efficient** - Processes large files without excessive memory usage\n\n## Requirements\n\n- Python 3.8+\n\n## License\n\nMIT",
"bugtrack_url": null,
"license": "MIT",
"summary": "MHTML to HTML converter library using Python stdlib",
"version": "0.1.0",
"project_urls": null,
"split_keywords": [
"archive",
" converter",
" html",
" mhtml",
" mime",
" web"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "d6be75af9fa225a7e3a8c091525c2bb01c0027a46b8c0918153455af1e13f5d9",
"md5": "61a5a4622a1af48a046c1fc708268d37",
"sha256": "48d15ad8bc3b1e02894b91257065c8805c80a35847ac59ce438d7a75f6481b09"
},
"downloads": -1,
"filename": "unmhtml-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "61a5a4622a1af48a046c1fc708268d37",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 10186,
"upload_time": "2025-07-17T16:45:11",
"upload_time_iso_8601": "2025-07-17T16:45:11.675313Z",
"url": "https://files.pythonhosted.org/packages/d6/be/75af9fa225a7e3a8c091525c2bb01c0027a46b8c0918153455af1e13f5d9/unmhtml-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "5e73eb051db145d2df781ae30f12ac85026a039d5e612c66981207c792a04f4b",
"md5": "2e329f9f63b604602ebad07badae614a",
"sha256": "65f394e271be42ba4841a2329fe22670951e9df11950f3899ed43ed317f0dee0"
},
"downloads": -1,
"filename": "unmhtml-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "2e329f9f63b604602ebad07badae614a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 38495,
"upload_time": "2025-07-17T16:45:12",
"upload_time_iso_8601": "2025-07-17T16:45:12.952993Z",
"url": "https://files.pythonhosted.org/packages/5e/73/eb051db145d2df781ae30f12ac85026a039d5e612c66981207c792a04f4b/unmhtml-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-17 16:45:12",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "unmhtml"
}