Improved HTML rendering, command line client and Web service
·
428 commits
to master
since this release
- added support for rendering tags with the
white-space: preCSS attribute (e.g.<pre>which is often used for formatting code). - API change: A
ParserConfigobject replaces the parametersdisplay_images,dedpulicate_captions,display_linksandindentationinget_text()and for initializing theInscriptisclass.
from lxml.html import fromstring
from inscriptis.model.config import ParserConfig
html_tree = fromstring(html)
# optional parser configuration fine tuning
config = ParserConfig(display_links=True, display_anchors=True)
parser = Inscriptis(html_tree, config)
text = parser.get_text()- command line client:
- added option for displaying anchor links
--encodingnot sets the HTML and output encoding- new
--versionoption
- Web service
- use the related CSS profile per default
- added
versioncall
- Documentation fixes and improvements