Pagd

Template. Context. Page.

contents – Collection of content parsers

Contains a collection of plugins to parse content text from source layout and generate html text for each page. The module also defines a collection of library utilities that can be used by the plugins.

Module Listing

pagd.contents.rst2html(fpath, page)[source]

fpath is identified as a file containing ReStructured text. Read the file content, gather metadata from the content (if specified), translate content to HTML.

And return a tuple of (metadata, content). Content is HTML text.

pagd.contents.md2html(fpath, page)[source]

fpath is identified as a file containing markdown text. Read the file content, gather metadata from the content (if specified), translate content to HTML.

And return a tuple of (metadata, content). Content is HTML text.

pagd.contents.html2html(fpath, page)[source]

fpath is identified as a file containing raw-html text. If html contains <meta> tag elements, it will be used as source of meta-data information.

And return a tuple of (metadata, content). Content is HTML text.

pagd.contents.text2html(fpath, page)[source]

fpath is identified as a file containing plain text. If beginning of file contains text in the following format

:<name>: <value>
:<name>: <value>
:<name>: <value>

without any leading whitespace, it will be interpreted as meta-data and stripped off from the final text.

Return a tuple of (metadata, content). Content is HTML text.

Table Of Contents

Related Topics

This Page