Skip to main content

Decorate HTML docs by adding them classes by theme

Project description

Tests

Travis results Coveralls results_

Downloads

Last month downloads from pypi Last week downloads from pypi Yesterday downloads from pypi

About

License Wheel Python versions Python interpreters

Status

Status 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')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

decorate-1.0.1-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file decorate-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for decorate-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 17e348e3bb8d4eda68cbe756c61295b26c450c7018a2d26b5281231d6ba43ca8
MD5 92f152495b1d34986922fb80e332bb51
BLAKE2b-256 0199d50e201652e6b029ca79248a6ff80377b68429135e6dd7cf5cd923591af6

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