
Security News
Open Source Maintainers Demand Ability to Block Copilot-Generated Issues and PRs
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
################################# python-diminuendo - HTML minifier #################################
This is a generic HTML minifier NOT using regular expressions. This minifier is fully HTML5 compatible.
The name is coming from the Harry Potter books and is an incantation that forces objects to shrink <http://harrypotter.wikia.com/wiki/Diminuendo>
_
This project was started because of the lack of a maintained HTML minifier
not using complex regexp. This project uses beautifulsoup <http://www.crummy.com/software/BeautifulSoup/>
_ to navigate the HTML flow.
.. image:: https://travis-ci.org/hrbonz/python-diminuendo.svg?branch=master :target: https://travis-ci.org/hrbonz/python-diminuendo :alt: Testing Status
.. image:: https://readthedocs.org/projects/python-diminuendo/badge/?version=latest :target: https://readthedocs.org/projects/python-diminuendo/?badge=latest :alt: Documentation Status
.. image:: http://img.shields.io/badge/license-BSD%203--Clause-blue.svg :target: http://opensource.org/licenses/BSD-3-Clause :alt: license BSD 3-Clause
.. code-block:: sh
$ pip install python-diminuendo
TODO
.. code-block:: python
>>> from diminuendo import htmlmin
>>> html = """<html>
<head>
<title>Hello World!</title>
</head>
<body>
<p>Good morning</p>
</body>
</html>"""
>>> minified = htmlmin(html)
>>> print minified
'<html><head><title>Hello World!</title></head><body><p>Good morning</p></body></html>'
To add a minification test, simply add the html code as
test_name.html
and its minified version as
test_name-minified.html
in test/html
.
Test the package:
.. code-block:: sh
$ python -m unittest discover
Automatic testing in various environments:
.. code-block:: sh
$ tox
Use bumpr
to release the package:
.. code-block:: sh
$ bumpr -b -m
[...]
$ python setup.py sdist bdist_wheel upload
Source code on github <https://github.com/hrbonz/python-diminuendo>
_Documentation on readthedocs <http://python-diminuendo.readthedocs.org/>
_Package on pypi <https://pypi.python.org/pypi/python-diminuendo>
_django-htmlmin <https://github.com/cobrateam/django-htmlmin>
_htmlmin <https://github.com/mankyd/htmlmin>
_python-diminuendo is published under a BSD 3-clause license, see the LICENSE file distributed with the project.
FAQs
A generic HTML minifier for python
We found that python-diminuendo demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
Research
Security News
Malicious Koishi plugin silently exfiltrates messages with hex strings to a hardcoded QQ account, exposing secrets in chatbots across platforms.
Research
Security News
Malicious PyPI checkers validate stolen emails against TikTok and Instagram APIs, enabling targeted account attacks and dark web credential sales.