etgen.html

See Usage.

Functions

CLASS(*args)

lines2p(lines[, min_height, sep])

Convert the given list of text lines lines into a paragraph (<p>) with one <br> between each line.

table_body_row(*cells, **kw)

table_header_row(*headers, **kw)

to_rst(v[, stripped])

Render the given value as an rst formatted string.

tostring(v, *args, **kw)

tostring_pretty(*args, **kw)

Classes

Document(title[, stylesheets])

A pythonic representation of a <body> with a <title> and some <head> tags for stylesheets.

Table()

A pythonic representation of a <table> with <head>, <foot> and <body>.

etgen.html.to_rst(v, stripped=True)

Render the given value as an rst formatted string.

class etgen.html.Table

Bases: object

A pythonic representation of a <table> with <head>, <foot> and <body>.

class etgen.html.Document(title, stylesheets=None)

Bases: object

A pythonic representation of a <body> with a <title> and some <head> tags for stylesheets.

etgen.html.lines2p(lines, min_height=0, sep=functools.partial(<lxml.builder.ElementMaker object>, 'br'), **attrs)

Convert the given list of text lines lines into a paragraph (<p>) with one <br> between each line. If optional min_height is given, add empty lines if necessary.