SourceForge.net | 13 Feb 19:17 2009
Picon
Picon

[ docutils-Bugs-2596775 ] docfactory doesn't start up

Bugs item #2596775, was opened at 2009-02-13 18:17
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=422030&aid=2596775&group_id=38414

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: blokeley (blokeley)
Assigned to: Nobody/Anonymous (nobody)
Summary: docfactory doesn't start up

Initial Comment:
This may be a dup of 1889573 but *has a different traceback* so I filed it separately.

Versions:
Windows XP Pro Version 2002, SP3
Python 2.5.2
wxPython 2.8.9.1 (I think)

traceback:

:\Python25\lib\site-packages\docutils\factory\browser.py:9: DeprecationWarning: The wxPython
compatibility package is no longer automatically generated or actively maintained.  Please switch to
(Continue reading)

Michael Jones | 15 Feb 18:51 2009
Picon

Generating new pages

Hi,

I'm trying to write a directive (as a Sphinx extension) that processes
the xml output from doxygen and creates the right docutils nodes to
generate a nice looking view of classes, etc. I've got a basic test
working where some of the information is presented in a single page
but ultimately I'd like to create a page per class. Is it possible to
generate multiple pages using a single directive?

If not, do you have any recommendations for how to proceed? I guess
another route might be to create system to automatically generated the
raw restructured text for all the pages required and then include them
in the Sphinx project?

Sorry if I've got the wrong side of the docutils/Sphinx line,
Michael

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
David Goodger | 16 Feb 17:53 2009

Re: Generating new pages

On Sun, Feb 15, 2009 at 12:51, Michael Jones <m.pricejones <at> gmail.com> wrote:
> I'm trying to write a directive (as a Sphinx extension) that processes
> the xml output from doxygen and creates the right docutils nodes to
> generate a nice looking view of classes, etc. I've got a basic test
> working where some of the information is presented in a single page
> but ultimately I'd like to create a page per class. Is it possible to
> generate multiple pages using a single directive?

There is a project in the sandbox, rst2chunkedhtml, that may be useful:
http://docutils.sourceforge.net/sandbox/rst2chunkedhtml/

Sphinx may offer relevant functionality, but I'm not familiar with it.

I don't see how directives are relevant.

> If not, do you have any recommendations for how to proceed? I guess
> another route might be to create system to automatically generated the
> raw restructured text for all the pages required and then include them
> in the Sphinx project?
>
> Sorry if I've got the wrong side of the docutils/Sphinx line,

Any questions related to Sphinx should be sent to the Sphinx project
mailing list, thanks.

--

-- 
David Goodger <http://python.net/~goodger>

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
(Continue reading)

Dave Kuhlman | 18 Feb 20:25 2009
Picon

Questions about directives, images, hints, etc

I've had several questions and suggestions from a user of rst2odt.py/odtwriter
about (1) the way in which rst2odt.py wraps text around images and (2) the
anchor type given to images.

The image directive does not have either a "wrap" option or an "anchor-type"
option.  So, I'm wondering if there is any way to pass through some sort 
of hint to be used by some writers but ignored by others.  Or, is there
some other way to get the same effect or that a docutils writer can
support the user's ability to control this.

One more question related to directives -- Am I correct that docutils writers
should only support a given directive if all writers do so?  Perhaps another
way to ask this is -- Is it a policy of the docutils project to only support the
standard, documented directives.  If true, that sounds fine to me, but I'd just like
to know.

- Dave

--

Dave Kuhlman
http://www.rexx.com/~dkuhlman

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
(Continue reading)

Guenter Milde | 19 Feb 11:07 2009
Picon

Re: Questions about directives, images, hints, etc

On 2009-02-18, Dave Kuhlman wrote:

> The image directive does not have either a "wrap" option or an "anchor-type"
> option.  So, I'm wondering if there is any way to pass through some sort 
> of hint to be used by some writers but ignored by others.  Or, is there
> some other way to get the same effect or that a docutils writer can
> support the user's ability to control this.

This is what class arguments are for.

> One more question related to directives -- Am I correct that docutils
> writers should only support a given directive if all writers do so?
> Perhaps another way to ask this is -- Is it a policy of the docutils
> project to only support the standard, documented directives. 

AFAIK, yes.

In many cases, you can use a "matching" object together with a
class argument, e.g.

.. class:: sourcecode python

::

   print "hello world"

would be recognized as a literal block with source code in Python by
some writers and written as a "normal" literal block by others.

Günter
(Continue reading)

Guenter Milde | 19 Feb 15:11 2009
Picon

Re: missing info in docs/ref/doctree.html#classes

On 2009-01-30, David Goodger wrote:
> On Fri, Jan 30, 2009 at 04:27, Guenter Milde <milde <at> users.berlios.de> wrote:

>>  * Shouldn't the doctree documentation be updated/corrected and mention
>>    the Attribute Value Conversion?

> Go ahead.

Done (see below). OK to commit?

Günter

Exec: svn 'diff' 2>&1
Dir: /home/milde/Code/Python/docutils-svn/docutils/docs/ref/

Index: doctree.txt
===================================================================
--- doctree.txt	(Revision 5866)
+++ doctree.txt	(Arbeitskopie)
 <at>  <at>  -4433,7 +4433,11  <at>  <at> 
 `Attribute type`_: ``NMTOKENS``.  Default value: none.

 The ``classes`` attribute is a list containing zero or more names used
-to classify an element.  The purpose of the attribute is to indicate
+to classify an element. The names are converted to conform to the
+regular expression ``[a-z](-?[a-z0-9]+)*`` (see the `"class"
+directive`_ description for details and rationale_).
+
+The purpose of the attribute is to indicate
 an "is-a" variant relationship, to allow an extensible way of defining
(Continue reading)

David Goodger | 19 Feb 15:34 2009

Re: missing info in docs/ref/doctree.html#classes

On Thu, Feb 19, 2009 at 09:11, Guenter Milde <milde <at> users.berlios.de> wrote:
> On 2009-01-30, David Goodger wrote:
>> On Fri, Jan 30, 2009 at 04:27, Guenter Milde <milde <at> users.berlios.de> wrote:
>
>>>  * Shouldn't the doctree documentation be updated/corrected and mention
>>>    the Attribute Value Conversion?
>
>> Go ahead.
>
> Done (see below). OK to commit?

Yes. I'd like to move some parts around a bit, but it will be easier
to just do that than it would be to describe it.

--

-- 
David Goodger <http://python.net/~goodger>

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
Richard Jones | 20 Feb 05:24 2009
Picon

Re: Questions about directives, images, hints, etc

[David, sorry you'll get two copies of this I'm still learning how to
drive gmail :)]

On Fri, Feb 20, 2009 at 9:19 AM, David Goodger <goodger <at> python.org> wrote:
> Yes, that is one way of stating the policy. Any tool can wrap the
> Docutils core and add non-standard directives to the reST parser, but
> then any documents using those directives become tied to that tool.
> That should be avoided.

Unless that tool is called "Bruce, the Presentation Tool" and the
directives in question are highly specific to projected
presentations*.

Bruce now has his own HTML writer which handles such things as the
"intepreter", "video", "style", "layout", etc. directives.

*... well, except "code" which invokes the pygments functionality.
Pygments is probably a good case study in a directive that would be
used in more places if it was somehow easier to bolt onto existing
docutils tools. As it is I use it in two ways:

1. In parsing the document for screen display I handle
pygments-generated docutils nodes in my display code, and
2. In parsing for html output I use a different parser and directive
handler which generates raw HTML inserted into the output (which is
pygments' recommended usage).

Hmm :)

   Richard
(Continue reading)

Guenter Milde | 20 Feb 12:10 2009
Picon

Re: Questions about directives, images, hints, etc

On 2009-02-20, Richard Jones wrote:
> On Fri, Feb 20, 2009 at 9:19 AM, David Goodger <goodger <at> python.org> wrote:

>> ... Any tool can wrap the Docutils core and add non-standard
>> directives to the reST parser, but then any documents using those
>> directives become tied to that tool. That should be avoided.

> Unless [...] the directives in question are highly specific [...]
...
> *... well, except "code" which invokes the pygments functionality.
> Pygments is probably a good case study in a directive that would be
> used in more places if it was somehow easier to bolt onto existing
> docutils tools. 

It is also a case study of incompatibilities that arise when different
apps use different implementations. (See the documentation__ of the
"code-block-directive" sandbox project. The source
(sandbox/code-block-directive/docs/syntax-highlight.txt) is just updated,
so it may take a while until the up-to-date version appears on
sourceforge.)

__ http://docutils.sf.net/sandbox/code-block-directive/docs/syntax-highlight.html

> As it is I use it in two ways:

> 1. In parsing the document for screen display I handle
> pygments-generated docutils nodes in my display code, and
> 2. In parsing for html output I use a different parser and directive
> handler which generates raw HTML inserted into the output (which is
> pygments' recommended usage).
(Continue reading)

Georg Brandl | 20 Feb 12:47 2009
Picon
Picon

Node.traverse() optimization

Hi,

while profiling a performance problem in Sphinx recently, I found that
quite a lot of time during parsing is spent in Node.traverse(). Since
most of the time it is called with a node class as the condition and
otherwise default arguments, I thought it might make sense to specialize
for this case. In addition to that, traverse() is also often called
without any condition.

The result was that a build of the Python docs runs about 20% faster,
and I've added the optimization to Sphinx (monkeypatching Node). Now
I've also prepared a patch to docutils that does the same, it is
attached.

I've timed a build of the docutils documentation using ::

   python tools/buildhtml.py docs

and the patch brought the runtime from 32.1 sec to 26.1 sec on my
machine, which is almost 20% gain.

cheers,
Georg

--

-- 
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.
(Continue reading)


Gmane