[Twisted-Python] Lore and generating reStructuredText (Lore2Sphinx)

Glyph glyph at twistedmatrix.com
Mon Mar 25 19:29:04 EDT 2013


On Mar 25, 2013, at 9:16 AM, Kevin Horn <kevin.horn at gmail.com> wrote:

> How can you tell that this was created by a directive?  You can't, because it could just as easily have been a list full of links to begin with.

But, I don't care if it was created by a directive or not.

I think we're talking about two different things.

What you seem to be talking about is using Sphinx to do source-to-source Lore-to-ReST transformation.  In that case, you're (sort of) right, in that information is lost when you invoke directives.  If we did this, and it worked, it would just be a slightly better way to implement lore2sphinx; we'd still need to manage the transition in largely the same way.

What *I'm* talking about is just using Lore source as an input to Sphinx, and going straight to the output HTML.  In order to do this, we just need to construct the right tree and actually *invoke* the directive callables at the right time.  They produce whatever output they want to produce, and we hand that back to Sphinx, and it outputs some docs.  With this strategy, we just switch to sphinx by switching our build process; we don't switch input formats.  Then, if someone wants to use Lore they can, if they want to use ReST they can, and we can migrate on an as-needed basis; there's no need for a single big format migration for us to start using Sphinx.

-glyph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20130325/e40c71a4/attachment.htm 


More information about the Twisted-Python mailing list