Skip to main content

UNKNOWN

Project description

Fast lxml-based CSS stylesheet inliner.

https://travis-ci.org/disqus/toronado.svg?branch=master

Tested against both Python 2.7 and 3.3.

Installation

This package is hosted on PyPI and can be installed using pip or easy_install:

pip install toronado

Usage

>>> import toronado
>>> from lxml import html
>>> 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


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.4.tar.gz (3.5 kB view details)

Uploaded Source

File details

Details for the file toronado-0.0.4.tar.gz.

File metadata

  • Download URL: toronado-0.0.4.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for toronado-0.0.4.tar.gz
Algorithm Hash digest
SHA256 dede0ede4b0d02b5a666fb1365f51b97fe36dfadbaf1f7675928a615446caf95
MD5 c389ab3fb99f344dc74e440a4bda12c8
BLAKE2b-256 71537d005e98e585783f17d54175ba622ee4a00f6a9e4adcfb193f18248e40b4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page