[sphinx-dev] Included non-rst files not copied to _source directory

2010-03-29 Thread TP
http://sphinx.pocoo.org/rest.html#substitutions says:

"If you want to use some substitutions for all documents, put them into
a separate file and include it into all documents you want to use them
in, using the include directive. Be sure to give the include file a file
name extension differing from that of other source files, to avoid
Sphinx finding it as a standalone document."

However, if you DO name your included file with an extension other than
.rst (say .hr), it will NOT be copied over to the _build/html/_sources
directory.

Additionally, in the latest trunk revision, the unused_docs conf.py
option no longer works, so if you change the name back to include .rst,
you then get the "WARNING: document isn't included in any toctree"
message.

If instead you add the file to the new exclude_patterns option, then
again it no longer gets copied to the _sources directory.

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



Re: [sphinx-dev] Included non-rst files not copied to _source directory

2010-03-29 Thread Max Battcher

TP wrote:

Additionally, in the latest trunk revision, the unused_docs conf.py
option no longer works, so if you change the name back to include .rst,
you then get the "WARNING: document isn't included in any toctree"
message.


That warning is certainly harmless, if that's your biggest concern 
against using .rst as the file extension. In an earlier thread Georg 
mentioned that maybe it was time that warning was rewritten or 
rethought, because it looks scarier than it is intended to be. From what 
it appears to me, it's meant to be something of a "Hey, did you know you 
didn't add this file to your toctree?" reminder than a "Whoops, things 
are broken because you have a document that you haven't put into a 
toctree." I think that maybe the documentation you cited should be 
rewritten as well.


--
--Max Battcher--
http://worldmaker.net

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



[sphinx-dev] ReStructuredTextToolsForGedit

2010-03-29 Thread Justin Rosen
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

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



[sphinx-dev] Re: ReStructuredTextToolsForGedit

2010-03-29 Thread Tim Michelsen
> 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?

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



[sphinx-dev] Include directive doesn't correctly support "absolute" paths

2010-03-29 Thread TP
.. include:: /include.rst

in the file c:\docs\project\subdir\index.rst

looks for c:\include.rst instead of looking in the top source directory
c:\docs\project\include.rst.

Conversely, the image directive docs
(http://sphinx.pocoo.org/rest.html#images) say:

   .. image:: gnu.png

   When used within Sphinx, the file name given (here gnu.png) must
   either be relative to the source file, or absolute which means that
   they are relative to the top source directory. For example, the file
   sketch/spam.rst could refer to the image images/spam.png as
   ../images/spam.png or /images/spam.png.

So how can I include files that are in the "top source directory", no
matter how far down in the project hierarchy the current source file is?

(Given how simple it looks to be, perhaps I'll just implement
rst-prologue and avoid the whole include issue)

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



[sphinx-dev] Include directive doesn't correctly support "absolute" paths

2010-03-29 Thread TP
.. include:: /include.rst

in the file c:\docs\project\subdir\index.rst

looks for c:\include.rst instead of looking in the top source directory
c:\docs\project\include.rst.

Conversely, the image directive docs
(http://sphinx.pocoo.org/rest.html#images) say:

   .. image:: gnu.png

   When used within Sphinx, the file name given (here gnu.png) must
   either be relative to the source file, or absolute which means that
   they are relative to the top source directory. For example, the file
   sketch/spam.rst could refer to the image images/spam.png as
   ../images/spam.png or /images/spam.png.

So how can I include files that are in the "top source directory", no
matter how far down in the project hierarchy the current source file is?

(Given how simple it looks to be, perhaps I'll just implement
rst-prologue and avoid the whole include issue)

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



Re: [sphinx-dev] Included non-rst files not copied to _source directory

2010-03-29 Thread TP
Yea, I was just ignoring the warning message.

However, as described in my "Include directive doesn't correctly support
'absolute' paths" message, includes seem to be useless when used from
multiple subdirs in the same project.

Unless I'm missing something, there doesn't seem to be any easy way to
use the same include directive from multiple subdirs. You might be able
to use different 'relative' paths depending on where you are including
from but that seems more bother than it's worth.

Instead, for now, I'll just implement a rst-prologue conf.py option
(analogous to the rst-epilog option) and avoid includes altogether.

On Mon, Mar 29, 2010 at 12:30 PM, Max Battcher  wrote:
> TP wrote:
>>
>> Additionally, in the latest trunk revision, the unused_docs conf.py
>> option no longer works, so if you change the name back to include .rst,
>> you then get the "WARNING: document isn't included in any toctree"
>> message.
>
> That warning is certainly harmless, if that's your biggest concern against
> using .rst as the file extension. In an earlier thread Georg mentioned that
> maybe it was time that warning was rewritten or rethought, because it looks
> scarier than it is intended to be. From what it appears to me, it's meant to
> be something of a "Hey, did you know you didn't add this file to your
> toctree?" reminder than a "Whoops, things are broken because you have a
> document that you haven't put into a toctree." I think that maybe the
> documentation you cited should be rewritten as well.
>
> --
> --Max Battcher--
> http://worldmaker.net
>
> --
> You received this message because you are subscribed to the Google Groups
> "sphinx-dev" group.
> To post to this group, send email to sphinx-...@googlegroups.com.
> To unsubscribe from this group, send email to
> sphinx-dev+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/sphinx-dev?hl=en.
>
>

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



Re: [sphinx-dev] Re: ReStructuredTextToolsForGedit

2010-03-29 Thread TP
I use emacs and rst.el.

On Mon, Mar 29, 2010 at 1:21 PM, Tim Michelsen
 wrote:
>> 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?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sphinx-dev" group.
> To post to this group, send email to sphinx-...@googlegroups.com.
> To unsubscribe from this group, send email to 
> sphinx-dev+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/sphinx-dev?hl=en.
>
>

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



Re: [sphinx-dev] Included non-rst files not copied to _source directory

2010-03-29 Thread Fernando Perez
On Mon, Mar 29, 2010 at 2:42 PM, TP  wrote:
>
>
> However, as described in my "Include directive doesn't correctly support
> 'absolute' paths" message, includes seem to be useless when used from
> multiple subdirs in the same project.
>
> Unless I'm missing something, there doesn't seem to be any easy way to
> use the same include directive from multiple subdirs. You might be able
> to use different 'relative' paths depending on where you are including
> from but that seems more bother than it's worth.
>
> Instead, for now, I'll just implement a rst-prologue conf.py option
> (analogous to the rst-epilog option) and avoid includes altogether.

My (hackish, ugly but functional) solution to this is to use

include: foo.txt

and in *every* directory (but the project topmost one, of course),
have a symlink

foo.txt -> ../foo.txt

so they eventually all resolve at the top.  Not pretty, but works for me :)

Cheers,

f

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



Re: [sphinx-dev] Ordering members by order in source code?

2010-03-29 Thread pamela fox
Thanks, Georg! Is this in 0.6.5? I pulled down the egg for that, but I don't
think I see the code change there.
(http://pypi.python.org/pypi/Sphinx)

On Sun, Feb 28, 2010 at 9:40 PM, Georg Brandl  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Am 28.02.2010 08:12, schrieb pamela fox:
> > Okay, thanks, I'm now following that issue.
> >
> >
> > On Sun, Feb 28, 2010 at 9:24 AM, Georg Brandl  > > wrote:
> >
> > Am 25.02.2010 06:08, schrieb pamela:
> >> Hi there-
> >
> >> I saw some old threads about ordering members in a module by the order
> >> they are in the source code. I tried the hacks suggested there, but
> >> don't seem to work. Has there been any progress in that regards?
> >> This would be a great addition to Sphinx.
> >
> >> The documentation is much harder to understand when the members are
> >> not in conceptual order.
> >
> > I understand that, but unfortunately, I've not made any changes there,
> > but it is still possible with a bit of new code.  It's already
> > tracked in
> > issue 187, so you don't need to open another tracker issue.
>
> I've now implemented this; see
> http://bitbucket.org/birkenfeld/sphinx-domains/changeset/3474d539292a/.
>
> Georg
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v2.0.14 (GNU/Linux)
>
> iEYEARECAAYFAkuKSDIACgkQN9GcIYhpnLDD/QCfcW58k2glQOs1uiOfoSArtk5q
> LgsAn28ndazhIkn611OblOPX53DFiGFI
> =8j+3
> -END PGP SIGNATURE-
>
> --
> You received this message because you are subscribed to the Google Groups
> "sphinx-dev" group.
> To post to this group, send email to sphinx-...@googlegroups.com.
> To unsubscribe from this group, send email to
> sphinx-dev+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/sphinx-dev?hl=en.
>
>

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



Re: [sphinx-dev] ReStructuredTextToolsForGedit

2010-03-29 Thread werner

Hi Justin,

On 29/03/2010 21:43, Justin Rosen wrote:
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, ...)


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

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