From: Martin G. <mg...@la...> - 2009-07-13 16:16:09
|
Hi everybody, I've been experiementing with using reStructuredText for the documentation in the Mercurial project. It's a huge improvement over the way we're using asciidoc right now. For help in the terminal, we currently print raw text. However, for reStructuredText, I figured that we could clean it a bit by turning '::' into ':'. But then I figured that I could also reflow the paragraphs, and detect simple lists, ... :-) The result is a simple parser that can format a *small subset* of reStructuredText into (more) plain ASCII. I've called it minirst and posted it as a patch here: http://markmail.org/message/zmooveljd7mrsbla There are tests at the bottom of the email, which shows the input and output of the module. Greg Ward asked on our list, if it was OK to claim the name 'minirst'. So let me know if you want me to use another? Also, if you know of another simple reStructuredText parser then please let me know. Mercurial can unfortunately not depend on third-party packages, so I'm looking for something small that we can ship directly. -- Martin Geisler VIFF (Virtual Ideal Functionality Framework) brings easy and efficient SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/. |
From: David G. <go...@py...> - 2009-07-13 17:47:33
|
On Mon, Jul 13, 2009 at 12:15, Martin Geisler<mg...@la...> wrote: > Greg Ward asked on our list, if it was OK to claim the name 'minirst'. No objections here. -- David Goodger <http://python.net/~goodger> |
From: Martin G. <mg...@la...> - 2009-07-13 18:30:54
|
David Goodger <go...@py...> writes: > On Mon, Jul 13, 2009 at 12:15, Martin Geisler<mg...@la...> wrote: >> Greg Ward asked on our list, if it was OK to claim the name 'minirst'. > > No objections here. Thanks! Has anybody heard of another project that will turn reStructuredText From almost plain text into really plain text? On a related note, has anybody done a rst2rst program? The idea would be that the program could wrap paragraphs nicely, ensure uniform indention, and otherwise clean up the input, but without changing its meaning. -- Martin Geisler VIFF (Virtual Ideal Functionality Framework) brings easy and efficient SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/. |
From: David G. <go...@py...> - 2009-07-13 19:10:14
|
On Mon, Jul 13, 2009 at 14:30, Martin Geisler<mg...@la...> wrote: > Has anybody heard of another project that will turn reStructuredText > From almost plain text into really plain text? There have been some attempts. Here's one: http://sourceforge.net/mailarchive/message.php?msg_name=90326f110904260127m6b05ceb2v6d201b86dd7e9baf%40mail.gmail.com That's as much as springs immediately to hand. Beyond that, Google is as much your friend as mine. -- David Goodger <http://python.net/~goodger> |
From: Martin G. <mg...@la...> - 2009-07-13 19:31:56
|
David Goodger <go...@py...> writes: > On Mon, Jul 13, 2009 at 14:30, Martin Geisler<mg...@la...> wrote: >> Has anybody heard of another project that will turn reStructuredText >> From almost plain text into really plain text? > > There have been some attempts. Here's one: > > http://sourceforge.net/mailarchive/message.php > ?msg_name=90326f110904260127m6b05ceb2v6d201b86dd7e9baf%40mail.gmail.com > > That's as much as springs immediately to hand. Beyond that, Google is > as much your friend as mine. Heh, I don't know why I didn't think of searching for 'rst2txt' or 'rst2rst' before... :-) The project you linked looks very ambitious and active: http://developer.berlios.de/projects/transcribo/ I also found this which links to a rst2rst tool: http://lateral.netmanagers.com.ar/weblog/2006/11/02.html -- Martin Geisler VIFF (Virtual Ideal Functionality Framework) brings easy and efficient SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/. |
From: Roberto A. <ra...@ne...> - 2009-07-13 19:47:45
|
Martin Geisler writes: > David Goodger <go...@py...> writes: > >> On Mon, Jul 13, 2009 at 12:15, Martin Geisler<mg...@la...> wrote: >>> Greg Ward asked on our list, if it was OK to claim the name 'minirst'. >> >> No objections here. > > Thanks! > > Has anybody heard of another project that will turn reStructuredText > From almost plain text into really plain text? > > On a related note, has anybody done a rst2rst program? The idea would be > that the program could wrap paragraphs nicely, ensure uniform indention, > and otherwise clean up the input, but without changing its meaning. http://lateral.netmanagers.com.ar/static/rst2rst/rst2rst.py Not really maintained, but used to work pretty well. |