UNKNOWN
Project description
Fast lxml-based CSS stylesheet inliner.
Tested against Python 2.7, 3.2, 3.3, and 3.4.
Installation
This package is hosted on PyPI and can be installed using pip or easy_install:
pip install toronado
Usage
>>> import toronado
>>> document = """<html>
... <head>
... <style type="text/css">
... h1 { color: red; }
... </style>
... </head>
... <body><h1>Hello, world.</h1></body>
... </html>"""
>>> print(toronado.from_string(document))
<html><head></head><body><h1 style="color: red">Hello, world.</h1></body></html>
Command Line Usage
To inline a file directly from the command line, you can use the following:
python -m toronado input.html
The inlined HTML will be printed to your shell’s stdout stream, and can also be redirected to a file:
python -m toronado input.html > output.html
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
toronado-0.0.6.tar.gz
(3.6 kB
view details)
Built Distribution
File details
Details for the file toronado-0.0.6.tar.gz
.
File metadata
- Download URL: toronado-0.0.6.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c914cbc6f8ac89ee3581e7e756f13decca1a157238be628158d97edb04301e52 |
|
MD5 | d441631698d43443e6214198aa5c1092 |
|
BLAKE2b-256 | fe2b2ee6affadfee20465c3da435d44611251436d5af649089187611e3169ae1 |
File details
Details for the file toronado-0.0.6-py2.py3-none-any.whl
.
File metadata
- Download URL: toronado-0.0.6-py2.py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc5402935ed7fe6f6e05a7636cfd820a276853b8114a198f5bcbb2c2f9c3451c |
|
MD5 | d1abf4465574a4a59ca9fdb3fbc8fd3e |
|
BLAKE2b-256 | e3d200110310c67268442abc586c217f7c0ddf084050e7b2161e9dd2c9a45bff |