HTML utility functions.
Split a path into its components.
Creates a unique, short, human readable file name base on the input file path.
Writes a DictTreeHtmlTable object as a table, for example as a directory structure. The key list in the DictTreeHtmlTable object is the path to the file i.e. os.path.abspath(p).split(os.sep) and the value is expected to be a pair of (link, nav_text) or None.
Writes a list of file names as an HTML table looking like a directory structure. theFileLinkS is a list of pairs (file_path, href). The navigation text in the cell will be the basename of the file_path.
Writes a list of file names as an HTML table looking like a directory structure. theFileLinkS is a list of triples (file_name, href, nav_text).
Writes file paths as a table, for example as a directory structure.
A callback function that is executed for a <td> element when there is a non-None value. This is called with the following arguments:
- theS
- The HTML stream.
- attrs
- A map of attrs that include the rowspan/colspan for the <td>
- k
- The key as a list of path components.
- v
- The value given by the caller.
Writes a link to another HTML file that represents source code. theS is an XHTML stream. theSrcPath is the path of the original source, whis will be encoded with retHtmlFileName(). theLineNum is an integer line number in the target. theText is optional navigation text. theClass is optional CSS class for the navigational text.