ReStructuredTextToolsForGedit

47 views
Skip to first unread message

Justin Rosen

unread,
Mar 29, 2010, 3:43:10 PM3/29/10
to sphin...@googlegroups.com
I was wondering what type of editor everyone uses for editing Sphinx rst files.  I've spent a great deal of time perusing the internet finding a ton of different things including some WYSIWYG editors.

I've just recently come across a plugin for gedit on linux.  http://textmethod.com/wiki/ReStructuredTextToolsForGedit

This comes with a preview window which uses docutils to generate it's output.  This works great, except that it doesn't like the sphinx directives.

It looks like the plugin boils down to this single line

from docutils.core import publish_string
html =  publish_string(text, writer_name='html')

Is there similar code for using sphinx?

import sphinx
html = sphin.FUNCTION(text, ...)

Thanks!
Justin

Tim Michelsen

unread,
Mar 29, 2010, 4:21:44 PM3/29/10
to sphin...@googlegroups.com
> I was wondering what type of editor everyone uses for editing Sphinx rst
> files. I've spent a great deal of time perusing the internet finding a ton
> of different things including some WYSIWYG editors.
on Windows Ulipad has a similar functionality.

Geany at least recognises RST outlines such as headlines...

Unfortunately, I haven't found a RST markup plugin for Eclipse.

Did anyone of you?

TP

unread,
Mar 29, 2010, 5:48:27 PM3/29/10
to sphin...@googlegroups.com
I use emacs and rst.el.

> --
> You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
> To post to this group, send email to sphin...@googlegroups.com.
> To unsubscribe from this group, send email to sphinx-dev+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
>
>

werner

unread,
Mar 30, 2010, 2:48:05 AM3/30/10
to sphin...@googlegroups.com
Hi Justin,

I use UliPad, but it has the same limitations - it would be nice if
there is a way to preview a single .rst file - with Sphinx directives
also working, but I don't think there is such a "build" command in
Sphinx at this time - would be very happy if someone would correct me on
this.

Werner

Guenter Milde

unread,
Mar 30, 2010, 3:21:44 AM3/30/10
to sphin...@googlegroups.com
On 2010-03-30, werner wrote:

> I use UliPad, but it has the same limitations - it would be nice if
> there is a way to preview a single .rst file - with Sphinx directives
> also working, but I don't think there is such a "build" command in
> Sphinx at this time - would be very happy if someone would correct me on
> this.

I was thinking about a "Sphinx-compatibility" backend for Docutils
that would allow this. It should define sensible fallbacks for the
Sphinx-specific roles and directives. I don't know how large the
effort to do this would be, as Sphinx and Docutils are drifting apart
more and more.

Günter

Roberto Alsina

unread,
Mar 30, 2010, 6:22:27 AM3/30/10
to sphin...@googlegroups.com

And unnecesarily :-(
Most of the sphinx directives could be hacked so they worked as addons to
docutils (by creating a sphinx-rst2html or whatever and just registering the
directives).

I am talking about graphviz, code blocks, production lists, and others.

Justin Rosen

unread,
Mar 30, 2010, 7:53:46 PM3/30/10
to sphin...@googlegroups.com
Thanks for the info, I'll stick with syntax highlighting for now!

TP

unread,
Apr 3, 2010, 3:50:05 AM4/3/10
to sphin...@googlegroups.com
On Mon, Mar 29, 2010 at 11:48 PM, werner <wbr...@free.fr> wrote:
> I use UliPad, but it has the same limitations - it would be nice if there is
> a way to preview a single .rst file - with Sphinx directives also working,
> but I don't think there is such a "build" command in Sphinx at this time -
> would be very happy if someone would correct me on this.

Under windows xp the following works to build a single file (and files
with dependent toctrees):

sphinx-build.exe -b html -d _build\doctrees . _build subdir/test.rst
Running Sphinx v1.0
loading pickled environment... done
building [html]: 1 source files given on command line
updating environment: 0 added, 1 changed, 0 removed
reading sources... [100%] subdir/test

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [ 33%] index
writing output... [ 66%] subdir/index
writing output... [100%] subdir/test

writing additional files... search
copying static files... done
dumping search index... done
dumping object inventory... done
build succeeded.

I presume something similar would work on other platforms.

Georg Brandl

unread,
Apr 4, 2010, 1:06:23 PM4/4/10
to sphin...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm not sure why you say this -- I don't think that something changed
there since Sphinx was first released.

cheers,
Georg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)

iEYEARECAAYFAku4xw4ACgkQN9GcIYhpnLAGnwCdE+CHLGXzlTgxK5CzUVAGPxTS
p9MAnjUuLhd8O8QigikAsPCMYEjyVAYd
=EmXl
-----END PGP SIGNATURE-----

Reply all
Reply to author
Forward
0 new messages