diff --git a/README.rst b/README.rst index 385ed7d..390b964 100644 --- a/README.rst +++ b/README.rst @@ -1,24 +1,30 @@ -cssselect2: CSS selectors for Python ElementTree -================================================ +cssselect2: unmaintained and incomplete experiments with CSS selectors for Python +================================================================================= -cssselect2 is a straightforward implementation of `CSS3 Selectors`_ for -`ElementTree`_-compatible documents (including cElementTree, lxml_, etc.) -Unlike cssselect_, it does not translate selectors to XPath_ -and therefore does not have all the correctness corner cases -that are hard or impossible to fix in cssselect. +`cssselect`_ implements `CSS Selectors`_ by converting them to XPath_, +and then relying on lxml_’s XPath implementation. -.. _ElementTree: http://docs.python.org/3/library/xml.etree.elementtree.html -.. _CSS3 Selectors: http://www.w3.org/TR/2011/REC-css3-selectors-20110929/ -.. _lxml: http://lxml.de/ -.. _cssselect: http://packages.python.org/cssselect/ -.. _XPath: http://www.w3.org/TR/xpath/ +At first, converting simple selectors seems easy enough. +But the two languages are different enough that I’m not even convinced that +some more complex selectors even have a correct translation. +See `issue 12`_ for an example. + +As such, I believe the XPath approach is fundamentally flawed. +So I started in this repository to implement Selectors without XPath, +by traversing a document tree directly. +It mostly works, but I got stuck on `deciding what kind of tree to support`_. +Since then, I’ve moved on to other things and I’m not very interested in pushing this further. +Please consider this project abandonned. +I will not publish it on PyPI or accept contributions. -Quick facts: +Feel free to use the code per the license if you find it useful. +If you make a proper library out of it I’m willing to give away the `cssselect2` name on PyPI +(file an issue on this repository to let me know). -* Free software: BSD licensed -* Compatible with Python 2.6+ and 3.2+ -* Source, issues and pull requests `on Github - `_ -* Releases `on PyPI `_ -* Install with ``pip install cssselect2`` +.. _cssselect: https://github.com/scrapy/cssselect +.. _CSS Selectors: https://drafts.csswg.org/selectors/ +.. _XPath: http://www.w3.org/TR/xpath/ +.. _lxml: http://lxml.de/ +.. _issue 12: https://github.com/scrapy/cssselect/issues/12 +.. _deciding what kind of tree to support: https://github.com/SimonSapin/cssselect2/issues/1