Tuesday 1 February 2011

Enthought's reStructuredText editor

With the Stackless Python 3.1.2 branch more or less working on both Ubuntu and Windows, I can concentrate on doing the few remaining tasks. One of these is to translate the Stackless documentation to speak the Python 3.x syntactical dialect. Because there's always some exercise in procrastination to choose, rather than get on with a task, I choose to look for aids in editing reStructuredText on Windows.

There are numerous excellent and free text editors on Windows, unfortunately none of the one non-niche ones support reStructuredText. Why is this? There are commercial text editors that support syntax highlighting for it, but all text editors are at some level an arbitrary set of features with an arbitrary look that work in an arbitrary way. The feature of restructured text highlighting isn't worth the price in effort and convenience of using another arbitrary text editor, let alone paying money to do so.

Searching for free custom targeted editors, led to three candidates:

  • ReSTedit - Looks unmaintained, and doesn't look user friendly enough to warrant spending an unknown amount of time.
  • rsted - Looked really good, but as Catherine Devlin describes, the process of getting it working is a long and torturous one.
  • reSTinPeace - Lots of dependencies including PyQT, only source available.. sorry but I've wasted enough time on that rabbit hole with rsted.
rsted

In the screenshots on the blog post, this looks very well done albeit clunky in the way open source GUI toolkits are. While a standalone text editor for reStructuredText editing is non-ideal and frankly cumbersome, the functionality this promises seems more than work it.

Here's the glorious screenshot from the Enthought blog post:


However, let me save you some pain, do not waste time trying to compile and install this. Following the instructions given on Catherine's blog, and also by one of her posters I encountered lots of problems getting the dependencies installed. And in doing so, it turns out those instructions are now wrong. rsted does not come in the AppTools egg anymore. And should you fetch and run the rsted source after installing all the dependencies, you probably end up without a working preview pane.


My instance of rsted is still sitting there waiting for the heat death of the universe to occur. At this point, I am questioning whether I really need WYSIWYG editing of reStructuredText. The only thing that would convince me to try this editor again, is a Windows installer that just installed this tool ready for use. But what I would really like, is a plugin for one of the existing non-niche open source Windows text editors. Of course, neither of these things are likely to happen.. so time to get back to editing raw unhighlighted reStructuredText.

11 comments:

  1. I had no luck with desktop editors either.
    Found nice online editor, though.
    http://rst.ninjs.org/

    ReplyDelete
  2. Being an avid vim user with no chance of WYSIWIG, I prefer editing my rst in vim and previewing it in a browser. I wrote a tiny desktop web server (restview on pypi) that renders rst files dynamically, so that hitting F5 would show me the latest version. It only depends on docutils and the standard library, so you may want to give it a try.

    ReplyDelete
  3. Or try Marius Gedminas' restview
    http://mg.pov.lt/restview/

    ReplyDelete
  4. Have you checked out Geany (http://www.geany.org/)
    It support highlighting and navigation of reStructuredText document structure. New versions
    have been released since I tested it and the support might be enhanced.

    ReplyDelete
  5. If you want something that gives you a live preview, you can try http://aroberge.blogspot.com/2009/09/live-preview-of-restructuredtext-to.html

    ReplyDelete
  6. Right, I remember the day when I had to write some documentation in RST format, but instead started to procrastinate and install the Enthought editor first. Terrific idea. I've got that blasted thing running, but I remember it took me a whole afternoon, and then still needed to fix it because it did not work properly with non-ascii chars. Needless to say the documentation was not written that day.

    ReplyDelete
  7. I couldn't agree more. I even have a full PyQt development system setup, and couldn't get this thing to compile.

    I would LOVE to have it though. :-/

    ReplyDelete
  8. Maybe you should take a look at PyK (http://kib2.free.fr/PyK/), it's the successor of reSTinPeace (not that is a really active project, no update in the last 3 years). Only dependencies is PyQt/Qt. Source code is only Python. Check this question on Stackoverflow:
    http://stackoverflow.com/questions/2746692/restructuredtext-tool-support

    ReplyDelete
  9. I've found the Baow extension for Firefox very good. Just don't install it in your default profile, use a separate profile just for Baow: https://addons.mozilla.org/en-US/firefox/addon/baow/

    ReplyDelete
  10. What about "http://notex.ch"? It's an online rest editor, but with a focus on PDF output (although you can generate HTML too).

    ReplyDelete
  11. This one may be the best http://sourceforge.net/p/retext/home/ReText/

    ReplyDelete