Skip to content
XPATH to CSS translator
Branch: master
Clone or download
Pull request Compare This branch is 70 commits behind santiycr:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
static
.gitignore
README.rst
app.yaml
cssify.py
index.yaml
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).

Usage

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'

From your browser:

Just open http://cssify.appspot.com

Known Issues and unsupported XPATHs

Known issues should have failing tests. Tests are part of the script itself. They use the doctest format. To run tests and see any known issue (failing test), just run cssify with the -t flag:

$ ./cssify.py -t
You can’t perform that action at this time.