etgen.html¶
See Usage.
Functions
|
|
|
Convert the given list of text lines lines into a paragraph ( |
|
|
|
|
|
Render the given text v as a reSTructuredText formatted string using |
|
Call |
|
Classes
|
A pythonic representation of a |
|
A pythonic representation of a |
- etgen.html.tostring(v, *args, **kw)¶
Call
lxml.etree.tostring()with the following additional rules:If the value is a generator, convert each item individually and concatenate their HTML.
If the value is not an ElementTree element , just convert it into a
str.
- etgen.html.to_rst(v, stripped=True)¶
Render the given text v as a reSTructuredText formatted string using
etgen.html2rst().If v`` is an ElementTree element, parse it first using
lxml.etree.fromstring().If v is a generator, iterate over it recursively.
- class etgen.html.Table¶
Bases:
objectA pythonic representation of a
<table>with<head>,<foot>and<body>.
- class etgen.html.Document(title, stylesheets=None)¶
Bases:
objectA 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.