From masklinn at masklinn.net Mon May 13 14:31:03 2013 From: masklinn at masklinn.net (Masklinn) Date: Mon, 13 May 2013 14:31:03 +0200 Subject: [Doc-SIG] reStructuredText writer? Message-ID: <8B346ACD-EFA4-40DB-A715-0EB2CCFCC9BB@masklinn.net> I'm using docutils to transform and extract information from rst/sphinx documents[0]. I've made good progress, but I'm now looking for a way to extract inline content from the documents and re-serialize it to rST. The extraction should work (just recurse through non-Text non-Inline content and grab Inline and Text stuff) but I don't really see a way to re-serialize content to rST (such as an rST writer, which should be useful to apply mechanical transformations to rST documents anyway), is there none built-in or available through a third-party? [0] to move from a terrible home-grown translation system to Sphinx's builtin one From benoit at marmelune.net Mon May 13 15:19:46 2013 From: benoit at marmelune.net (=?ISO-8859-1?Q?Beno=EEt_Bryon?=) Date: Mon, 13 May 2013 15:19:46 +0200 Subject: [Doc-SIG] reStructuredText writer? In-Reply-To: <8B346ACD-EFA4-40DB-A715-0EB2CCFCC9BB@masklinn.net> References: <8B346ACD-EFA4-40DB-A715-0EB2CCFCC9BB@masklinn.net> Message-ID: <5190E872.8010102@marmelune.net> Hi, Le 13/05/2013 14:31, Masklinn a ?crit : > I'm using docutils to transform and extract information from rst/sphinx > documents[0]. I've made good progress, but I'm now looking for a way to > extract inline content from the documents and re-serialize it to rST. > The extraction should work (just recurse through non-Text non-Inline > content and grab Inline and Text stuff) but I don't really see a way to > re-serialize content to rST (such as an rST writer, which should be > useful to apply mechanical transformations to rST documents anyway), > is there none built-in or available through a third-party? > > [0] to move from a terrible home-grown translation system to Sphinx's builtin one > _______________________________________________ > Doc-SIG maillist - Doc-SIG at python.org > http://mail.python.org/mailman/listinfo/doc-sig `rst2rst `_ is a third-party project. It has a partial implementation of such a reStructuredText writer. Since the implementation is not complete, it cannot handle most documents... That said, contributions are welcome! As an example, I haven't found a smart implementation for elements such as lists. Let me know if you have questions about the project. Benoit From smerten at oekonux.de Mon May 13 22:18:37 2013 From: smerten at oekonux.de (Stefan Merten) Date: Mon, 13 May 2013 22:18:37 +0200 Subject: [Doc-SIG] reStructuredText writer? In-Reply-To: <8B346ACD-EFA4-40DB-A715-0EB2CCFCC9BB@masklinn.net> References: <8B346ACD-EFA4-40DB-A715-0EB2CCFCC9BB@masklinn.net> Message-ID: <6766.1368476317@theowa.merten-home.homelinux.org> Hi Masklinn! Today Masklinn wrote: > I've made good progress, but I'm now looking for a way to > extract inline content from the documents and re-serialize it to rST. What format does the inline content have? Gr??e Stefan -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 307 bytes Desc: not available URL: