AsciiDoc builder and writer

19 views
Skip to first unread message

lruz...@redhat.com

unread,
May 25, 2017, 9:13:44 AM5/25/17
to sphinx-dev
Hello, I need your a little help from you. I am currently working on an AsciiDoc builder and writer for Sphinx and I already can use it to produce reasonably correct output. I have the files here: https://github.com/lruzicka/rst2adoc.

I have manually copied the files into builders and writers directories, changed their name to asciidoc.py as I saw with other builders and writers, and manually updated the applications.py for Sphinx to know about it. Now, locally I can build documents the standard Sphinx way.
I would like to distribute the solution a little bit around me so that people could test it, use it and report some errors, but I do not know what I need to create an installation script or something, so that others do not have to edit the applications.py by themselves.

How do I do it? Where shall I look?

PS: I am also willing to give it into core Sphinx if you want it. You should know that I am just a Python hobbyist, so the builder and writers still has issues.

Nathan Yergler

unread,
May 25, 2017, 12:57:00 PM5/25/17
to sphin...@googlegroups.com
Instead of modifying application.py you'll want to create a Sphinx extension, which is a Python package with a setup() function in it that registers with the Sphinx core.

See http://www.sphinx-doc.org/en/stable/extdev/index.html#discovery-of-builders-by-entry-point for information on registering builders, in particular. 

https://github.com/nyergler/hieroglyph/blob/master/src/hieroglyph/__init__.py is an example of registering builders in setup.py (although I haven't done any updates for Sphinx 1.6 to that).

NRY

--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages