Skip to content

Improved HTML rendering, command line client and Web service

Choose a tag to compare

@AlbertWeichselbraun AlbertWeichselbraun released this 20 May 19:10
· 428 commits to master since this release
  1. added support for rendering tags with the white-space: pre CSS attribute (e.g. <pre> which is often used for formatting code).
  2. API change: A ParserConfig object replaces the parameters display_images, dedpulicate_captions, display_links and indentation in get_text() and for initializing the Inscriptis class.
      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()
  1. command line client:
    • added option for displaying anchor links
    • --encoding not sets the HTML and output encoding
    • new --version option
  2. Web service
    • use the related CSS profile per default
    • added version call
  3. Documentation fixes and improvements