This package tackles "soup", i.e. trees which are created by the well-known beautifulsoup4 package from parsed HTML or XML sources. It might be possible to accomplish the same by using lxml_ directly, but it might have been more difficult, and thus it is left to another package.
spoonsmodule, for tackling "soup", e.g.has_any_class(a filter function to check for one of the given classes)
forksmodule (named mainly for historical reasons; for poking around in the soup), e.g.extract_linktext,convert_dimension_stylesidsmodule, for creation of new ids for HTML elementsid_factory:new_id = id_factory(...) id = new_id(prefix)
The modules are documented and tested by doctests. However, they currently don't fully work because of import problems; see the issue tracker.
Help is appreciated.
This add-on can be seen in action at the following sites:
For now, the functions are documented by doctests.
Install visaplan.kitchen by adding it to your buildout:
[buildout]
...
eggs =
visaplan.kitchen
and then running bin/buildout
- Issue Tracker: https://github.com/visaplan/kitchen/issues
- Source Code: https://github.com/visaplan/kitchen
If you are having issues, please let us know; please use the issue tracker mentioned above.
The project is licensed under the GPLv2.