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!
Project Description

CssDeadwood is a tool to search for unused CSS selectors by scanning given CSS files for CSS selectors and matching these against HTML files (and optionally PHP/Python/Ruby/templates source code).

Installation

The easiest way to install CssDeadwood is with pip:

pip install cssdeadwood

or easy_install:

easy_install cssdeadwood

These will install (among others) the cssdeadwood script in a bin folder corresponding with the used installation procedure.

Note that CssDeadwood depends on lxml, which may take a while to install/compile if it is not available on your system already.

Development

Or, if you want to go for the development version, clone CssDeadwood from https://github.com/soxofaan/CssDeadwood/

Usage

Basic usage of the cssdeadwood tool is pretty simple: just provide pass it one or more CSS files and one or more HTML files and let it do its job:

cssdeadwood style.css index.html

For example, CssDeadwood comes with a demo mode:

cssdeadwood --example

--------------------------------------------------------------------------------
Running CssDeadwood in example mode with following CSS and HTML file as input:
/path/to/cssdeadwood/test/files/css/css001.css
/path/to/cssdeadwood/test/files/html/html001.html
--------------------------------------------------------------------------------
INFO:cssdeadwood:Working with 1 CSS files.
INFO:cssdeadwood:Working with 1 HTML files.
INFO:cssdeadwood:Working with 0 source files.
INFO:cssdeadwood:Analysing CSS selectors from '/path/to/cssdeadwood/test/files/css/css001.css'
INFO:cssdeadwood:Extracted 5 CSS selectors from '/path/to/cssdeadwood/test/files/css/css001.css'.
INFO:cssdeadwood:DOM matching 5 CSS selectors: 3 matches, 2 unmatched with DOM from '/path/to/cssdeadwood/test/files/html/html001.html'
/path/to/cssdeadwood/test/files/css/css001.css
Could not determine usage of the following 2 CSS selectors (from 5 in total: 40.00%):
#content div.ad
a.premium
Release History

Release History

0.2.7

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.6

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

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
CssDeadwood-0.2.7.tar.gz (8.9 kB) Copy SHA256 Checksum SHA256 Source May 12, 2013

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