diff --git a/TODO b/TODO index 94019bb..1d027e9 100644 --- a/TODO +++ b/TODO @@ -8,10 +8,6 @@ user-visible needs * add support for .epub3 (or just .epub?) - * add support for asciidoc; instantiate a new instance of Docbook4XML - with a SourceDocument of the generated result of asciidoc --backend - docbook - * consider adding support for metadata extraction from documents * create TLDP DocBook 5.0 XSL files (if we care) diff --git a/tests/example.py b/tests/example.py index c8b2bae..9085e35 100644 --- a/tests/example.py +++ b/tests/example.py @@ -35,7 +35,7 @@ ex_docbook5xml = Namespace( ex_asciidoc = Namespace( doctype=tldp.doctypes.asciidoc.Asciidoc, - filename=opj(sampledocs, 'text-simple.txt'), + filename=opj(sampledocs, 'asciidoc-complete.txt'), ) # # ex_rst = Namespace( @@ -43,11 +43,6 @@ ex_asciidoc = Namespace( # filename=opj(sampledocs, 'restructuredtext-simple.rst'), # ) # -# ex_text = Namespace( -# doctype=tldp.doctypes.text.Text, -# filename=opj(sampledocs, 'text-simple.txt'), -# ) -# # ex_markdown = Namespace( # doctype=tldp.doctypes.markdown.Markdown, # filename=opj(sampledocs, 'markdown-simple.md'), diff --git a/tests/test_driver.py b/tests/test_driver.py index 0454e00..9680a8f 100644 --- a/tests/test_driver.py +++ b/tests/test_driver.py @@ -306,9 +306,22 @@ class TestDriverProcessSkips(TestInventoryBase): self.assertEquals(len(inc) + 1, len(inv.all.keys())) -@unittest.skip("Except when you want to spend time....") +# @unittest.skip("Except when you want to spend time....") class TestDriverBuild(TestInventoryBase): + def test_build_asciidoc(self): + self.add_docbook4xml_xsl_to_config() + c = self.config + c.build = True + self.add_new('Frobnitz-Asciidoc-HOWTO', example.ex_asciidoc) + inv = tldp.inventory.Inventory(c.pubdir, c.sourcedir) + self.assertEquals(1, len(inv.all.keys())) + docs = inv.all.values() + c.skip = [] + tldp.driver.publish(c, docs) + doc = docs.pop(0) + self.assertTrue(doc.output.iscomplete) + def test_build_linuxdoc(self): c = self.config c.build = True diff --git a/tldp/doctypes/asciidoc.py b/tldp/doctypes/asciidoc.py index efb13e5..f3d7839 100644 --- a/tldp/doctypes/asciidoc.py +++ b/tldp/doctypes/asciidoc.py @@ -21,6 +21,7 @@ class Asciidoc(Docbook4XML): required = {'asciidoc_asciidoc': isexecutable, 'asciidoc_xmllint': isexecutable, } + required.update(Docbook4XML.required) def make_docbook45(self): s = '''"{config.asciidoc_asciidoc}" \\