BigBrotherBot v1.8.0
System Development Information for the BigBrotherBot project.

b3::lib::elementtree::TidyTools Namespace Reference

Functions

def tidy
 Convert an HTML or HTML-like file to XHTML, using the tidy command line utility.
def getbody
 Get document body from a an HTML or HTML-like file.
def getzonebody
 Same as getbody, but turns plain text at the start of the document into an H1 tag.

Variables

string NS_XHTML = "{http://www.w3.org/1999/xhtml}"

Function Documentation

def b3::lib::elementtree::TidyTools::getbody (   file,
  options 
)

Get document body from a an HTML or HTML-like file.

This function uses the tidy function to convert HTML to XHTML, and cleans up the resulting XML tree.

Parameters:
fileFilename.
Returns:
A body element, or None if not successful.
def b3::lib::elementtree::TidyTools::getzonebody (   file,
  options 
)

Same as getbody, but turns plain text at the start of the document into an H1 tag.

This function can be used to parse zone documents.

Parameters:
fileFilename.
Returns:
A body element, or None if not successful.
def b3::lib::elementtree::TidyTools::tidy (   file,
  new_inline_tags = None 
)

Convert an HTML or HTML-like file to XHTML, using the tidy command line utility.

Parameters:
fileFilename.
new_inline_tagsAn optional list of valid but non-standard inline tags.
Returns:
An element tree, or None if not successful.

Variable Documentation

string b3::lib::elementtree::TidyTools::NS_XHTML = "{http://www.w3.org/1999/xhtml}"
 All Classes Namespaces Files Functions Variables Properties