rivista.parser package

Submodules

rivista.parser.atom module

rivista.parser.focuscript module

class rivista.parser.focuscript.ParserFocuscript

Bases: object

configuration()

Extract configuration elements from a Focuscript document.

Return type:

dict

metadata()

Extract metadata elements from a Focuscript document.

Return type:

dict

namespace()

Extract namespace elements from a Focuscript document.

Return type:

dict

stylesheet()

Extract stylesheet elements from a Focuscript document.

Return type:

_Element

xmlns()

Extract stylesheet namespaces from a Focuscript document.

Return type:

_Element

rivista.parser.opml module

class rivista.parser.opml.ParserOpml

Bases: object

document()

Generate an OPML Collection document.

rivista.parser.osd module

rivista.parser.sitemap module

class rivista.parser.sitemap.ParserSitemap

Bases: object

sitemapindex()

Generate a Sitemap document.

urlset()

Generate a Urlset document.

rivista.parser.toml module

rivista.parser.uri module

class rivista.parser.uri.ParserUri

Bases: object

check_xmpp_uri()

Check validity of an XMPP URI.

Return type:

bool

hostname()

Remove useless subdomain from a given URI.

Return type:

str

parse()
Return type:

ParseResult

scheme()

Return scheme of a given URI.

Return type:

str

rivista.parser.xml module

class rivista.parser.xml.ParserXml

Bases: object

append_xml_to_xml(xhtml_content_str, expression_xpath)

Modify an XML file.

This function, previously named “append_xhtml_to_xslt”, was utilized to add custom elements to XSLT stylesheets.

rst_content_str = open(filepath_rst, mode=”r”).read() expression_xpath = UtilityRst.value_of_metadata(

rst_content_str, “xpath”)

xhtml_content_str = UtilityDocument.convert(

rst_content_str, “xhtml”)

ParserXml.append_xhtml_to_xslt(filepath_xslt,

xhtml_content_str, expression_xpath)

Now, reStructuredText preambles that are converted into CSV, custom element atom:link, and XSLT directives that manage element atom:link handle that task.

create_element_tree_from_file()
Return type:

_Element

create_element_tree_from_string()
Return type:

_Element

rivista.parser.xslt module

class rivista.parser.xslt.ParserXslt

Bases: object

transform_data(filepath_xslt, **kwargs)

Transform an XML document by a specified XSLT stylesheet filename.

Return type:

str

Module contents