Tests |
|
Downloads |
|
About |
|
Status |
About Decorate
Decorate takes an HTML and decorates it with style.
Currently it just support Bootstrap, but it is built in order to allow any other framework.
MDL (Material Design Lite) current support is very poor.
How does it work
It parses the HTML, uses a set of rules and creates a new HTML with new classes.
You can say: “Well… I could have done the same by using JavaScript”, and you’d right. But there are some advantages in using it statically:
It is faster. You have just to run it once.
It can be used in third parties projects. Forget about the style from now on.
Avoids the blink while javascript is being applied.
What was it intended for?
I was writting a static test runner, and I decided not to tie it to any style. This was a spin off. Indeed, it could be run as command line…
Usage
Command line
Please, run the help command with -h.
Here you are a basic example:
decorate my.html -t bootstrap -o output
Library
Easy: just import and use it:
from decorate import Decorate
decorate = Decorate('bootstrap')
with open('my.html') as fd:
decorate.apply_to(fd.read(), 'output.html')
Metadata
Release files for decorate 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| decorate-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Release files / decorate-1.0.1-py3-none-any.whl
| Download URL | decorate-1.0.1-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
17e348e3bb8d4eda68cbe756c61295b26c450c7018a2d26b5281231d6ba43ca8
|
|
BLAKE2b-256 checksum How to use checksums |
0199d50e201652e6b029ca79248a6ff80377b68429135e6dd7cf5cd923591af6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for decorate 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.