Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Decorate HTML docs by adding them classes by theme

Project Description
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')
Release History

Release History

This version
History Node

1.0.1

History Node

1.0.0

History Node

0.0.17

History Node

0.0.16

History Node

0.0.15

History Node

0.0.14

History Node

0.0.13

History Node

0.0.12

History Node

0.0.5

History Node

0.0.4

History Node

0.0.3

History Node

0.0.2

History Node

0.0.1

History Node

0.0.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
decorate-1.0.1-py3-none-any.whl (9.1 kB) Copy SHA256 Checksum SHA256 3.5 Wheel Jul 12, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting