{ "info": { "author": "Alexey Schebelev", "author_email": "", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# htmlfy\nPython package for HTML minification. \n\n## Installation\n```shell\npython3 -mpip install htmlfy\n```\n\n## Usage\n\n### Minifing HTML markup in variable\n\n```python\n>>> import htmlfy\n>>> html = \"\"\"\n \n \n
\nhello, world!
\n \n \"\"\"\n>>> htmlfy.minify_html(html)\n'hello, world!
'\n```\n\n### Minifing HTML file\n\n```python\n>>> import htmlfy\n>>> src_path = 'my_file.html'\n>>> dst_path = 'my_file.min.html'\n>>> htmlfy.minify_html_file(src_path,dst_path)\n```\n\n### Arguments\n\n```python\ndef htmlfy.minify_html(html,\n strict_spaces=True,\n no_space_between_tags=True,\n preserve=True,\n remove_comments=True,\n html5_min_attr=True,\n html5_emptytags=True\n )\n\ndef minify_html_file(source_path,minified_path,\n strict_spaces=True,\n no_space_between_tags=True,\n preserve=True,\n remove_comments=True,\n html5_min_attr=True,\n html5_emptytags=True\n )\n```\n\n* **strict_spaces** - strict all spaces(new lines, tabs and etc.) to single space. Except preserved blocks.\n* **no_space_between_tags** - delete all spaces between tags.\n* **preserve** - it will save all formating in ``,`