+ etree.SubElement(
+ body,
+ "script",
+ src="http://malsup.github.io/min/jquery.cycle2.min.js"
+ )
+
+
+class SnippetHtmlBuilder(HtmlBuilder):
+ with_themes = False
+ with_toc = False
+ with_footnotes = False
+ with_nota_red = False
+ with_ids = False
+ with_numbering = False
+
+
+class AbstraktHtmlBuilder(HtmlBuilder):
+ with_themes = False
+ with_toc = False
+ with_footnotes = False
+ with_nota_red = False
+ with_ids = False
+ with_numbering = False
+
+ root_tag = 'blockquote'
+ root_attrib = {}
+
+ def build(self, document, element=None, **kwargs):
+ if element is None:
+ element = document.tree.find('//abstrakt')
+ if element is None:
+ return OutputFile.from_bytes(b'')
+ element.attrib['_force'] = '1'
+ return super().build(document, element, **kwargs)
+
+
+class DaisyHtmlBuilder(StandaloneHtmlBuilder):
+ file_extension = 'xhtml'
+ with_themes = False
+ with_toc = False
+ with_footnotes = False
+ with_nota_red = False
+ with_deep_identifiers = False
+ no_externalities = True
+ with_numbering = False
+
+ def output(self):
+ tree = etree.ElementTree(self.tree)
+ tree.docinfo.public_id = '-//W3C//DTD XHTML 1.0 Transitional//EN'
+ tree.docinfo.system_url = 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'
+ return OutputFile.from_bytes(
+ etree.tostring(
+ tree,
+ encoding='utf-8',
+ pretty_print=True,
+ xml_declaration=True
+ )