XPATH to CSS translator
Python JavaScript
Failed to load latest commit information.
static
tests moving from doctests to actual unit tests and into the right director… Mar 17, 2013
.gitignore ignore all pyc Mar 22, 2012
.travis.yml fixing travis build, moved all tests to tests dir Mar 17, 2013
README.rst moving from doctests to actual unit tests and into the right director… Mar 17, 2013
app.yaml moving to latest app engine API Mar 5, 2013
cssify.py moving from doctests to actual unit tests and into the right director… Mar 17, 2013
index.yaml cssify web! using google app engine Jan 10, 2012
main.py

README.rst

cssify

Get your XPATHs translated to css automatically! (don't go to crazy on what you want to translate, this script is smart but won't do your breakfast).

[Build Status] [Sauce Status]

Usage

New! Use cssify from a browser:

http://cssify.appspot.com

From the console:

$ ./cssify.py '//a'
a
$ ./cssify.py '//a[@id="bleh"]'
a#bleh

From python:

>>> from cssify import cssify
>>> cssify('//a')
'a'
>>> cssify('//a[@id="bleh"]')
'a#bleh'

Testing and contributing

Supported and unsupported cases are documented by tests. If you have a request or a contribution for new conversions, include a test that proves the issue and solution and send a pull request.

To run all unit tests locally:

$ nosetests tests/test_cssify.py

To run all Selenium tests locally (some env variables are necessary):

$ nosetests tests/test_cssify_web.py