1 Sep 10:23 2011

### Re: Test suite failure

On 2011-08-31, Bill Thayer wrote:

Dear Bill,

The test passes here (Linux with locale ('de_DE', 'UTF8')).
Unfortunately, I cannot try with
> Microsoft Windows XP

The test failure

> AssertionError: u'Dornr\xf7schen' != u'Dornr\xf6schen'

might indicate a bug in Docutils or it could be a false
positive.

Could you start rst2html.py from the command line (DOS prompt) with the
option --title=Dornröschen and see if the title is correctly set

Dornröschen with Character 'ö' (246, 0xF6) LATIN SMALL LETTER O WITH DIAERESIS

or becomes

Dornr÷schen with Character '÷' (247, 0xF7) DIVISION SIGN

as indicated by the test.

Also I might need to know the "locale" setting.



2 Sep 19:19 2011

### function or otherwise to convert a ReSt table into python dict

All

(Sorry this got longer than I planned)

I would like to ask a question of the list.  I have been a long time
front end user of docutils (thank you!)
but just realised I have a need for deeper digging.  Gmane and a quick
grep seem not to give me the answer.

I want to use docutils to allow me to store data as nice tabular format,
but be able to parse that string in docutils
and get out a usable python object (not a docutils object).  For example
I would like to take

input = """
==== ====
test feed
==== ====
A     B
C     D
==== ===="""

and get

[
{'test':'A', 'feed':'B'},
{'test':'C', 'feed':'D'},
]

I have tried the following (I brute forced the optparse.Values.  FOr


2 Sep 23:38 2011

### Re: function or otherwise to convert a ReSt table into python dict

On Fri, 2 Sep 2011 18:19:10 +0100
"BRIAN, Paul" <paul.brian <at> bupa.com> wrote:

> I want to use docutils to allow me to store data as nice tabular format,
> but be able to parse that string in docutils
> and get out a usable python object (not a docutils object).

If I wanted to get something like that done in a hurry I'd convert text
to html with docutils, read the html with lxml, and use some python
code to grind the table into a dict using xpath.

I would think your approach should work, just depends whether you're
more comfortable digging in to docutils or using lxml.  Obviously

Cheers -Terry

------------------------------------------------------------------------------
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
http://p.sf.net/sfu/arcsisghtdev2dev

6 Sep 13:20 2011

### Re: function or otherwise to convert a ReSt table into python dict

one could use csv tables ?

On Fri, Sep 2, 2011 at 11:38 PM, Terry Brown <terry_n_brown <at> yahoo.com> wrote:
> On Fri, 2 Sep 2011 18:19:10 +0100
> "BRIAN, Paul" <paul.brian <at> bupa.com> wrote:
>
>> I want to use docutils to allow me to store data as nice tabular format,
>> but be able to parse that string in docutils
>> and get out a usable python object (not a docutils object).
>
> If I wanted to get something like that done in a hurry I'd convert text
> to html with docutils, read the html with lxml, and use some python
> code to grind the table into a dict using xpath.
>
> I would think your approach should work, just depends whether you're
> more comfortable digging in to docutils or using lxml.  Obviously
> you've already started the former.
>
> Cheers -Terry
>
> ------------------------------------------------------------------------------
> Finally, a world-class log management solution at an even better
> price-free! And you'll get a free "Love Thy Logs" t-shirt when you
> http://p.sf.net/sfu/arcsisghtdev2dev
> _______________________________________________
> Docutils-users mailing list
> Docutils-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/docutils-users


6 Sep 15:46 2011

### Re: function or otherwise to convert a ReSt table into python dict

On Fri, Sep 2, 2011 at 13:19, BRIAN, Paul <paul.brian <at> bupa.com> wrote:
> All
>
> (Sorry this got longer than I planned)
>
> I would like to ask a question of the list.  I have been a long time
> front end user of docutils (thank you!)
> but just realised I have a need for deeper digging.  Gmane and a quick
> grep seem not to give me the answer.
>
> I want to use docutils to allow me to store data as nice tabular format,
> but be able to parse that string in docutils
> and get out a usable python object (not a docutils object).  For example
> I would like to take
>
> input = """
> ==== ====
> test feed
> ==== ====
> A     B
> C     D
> ==== ===="""
>
> and get
>
> [
> {'test':'A', 'feed':'B'},
> {'test':'C', 'feed':'D'},
> ]
>


13 Sep 17:22 2011

### Test suite failure

Hi,

System config:
dan <at> voldemort:~/docutils$uname -a && ./tools/quicktest.py --v && python --version SunOS voldemort 5.11 snv_151a i86pc i386 i86pc Solaris quicktest.py (Docutils 0.9 [snapshot 2011-08-30, r7116]) Python 2.6.4 Built docutils so I could build the full Mercurial source including man pages. Everything seemed to compile ok, and hg works, but the man pages are screwy so I ran the full test suite. Attached is the output of "dan <at> voldemort:~/docutils$ ./test/alltests.py > ./test_results 2>&1"

Seems like this is a known bug on the Mercurial list:
http://mercurial.selenic.com/bts/issue2527 - not sure if it's docutils
or hg.

cheers
Dan

Attachment (test_results): application/octet-stream, 60 KiB
------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
BlackBerry&reg; mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry&reg; DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 

15 Sep 11:01 2011

### Re: Test suite failure

neither docutils nor mercurial

i see the same error on different pythons, on macosx python 2.6 (or
so) the error messages
are different. but it is one 2.6. subversion that brings up this
error, other 2.6 dont and other versions neither.

all the best
engelbert

On Tue, Sep 13, 2011 at 5:22 PM, Dan Green <dan <at> green.name> wrote:
> Hi,
>
> System config:
> dan <at> voldemort:~/docutils$uname -a && ./tools/quicktest.py --v && > python --version > SunOS voldemort 5.11 snv_151a i86pc i386 i86pc Solaris > quicktest.py (Docutils 0.9 [snapshot 2011-08-30, r7116]) > Python 2.6.4 > > Built docutils so I could build the full Mercurial source including man pages. > > Everything seemed to compile ok, and hg works, but the man pages are > screwy so I ran the full test suite. Attached is the output of > "dan <at> voldemort:~/docutils$ ./test/alltests.py > ./test_results 2>&1"
>
> Seems like this is a known bug on the Mercurial list:
> http://mercurial.selenic.com/bts/issue2527 - not sure if it's docutils
> or hg.
>


28 Sep 06:30 2011

### [ann] zot4rst 0.2 prerelease

Announcement: zot4rst 0.2 prerelease
====================================

New features
~~~~~~~~~~~~

- supports inline and footnote citations with the same syntax,
automatically inserting footnotes at the proper place
- fully pandoc_ compatible citation syntax, e.g. [*see*  <at> cite p. 10 and
nowhere else]
- new zupdatekeymap for managing mapping files automatically
- separation of core citation parsing from Zotero interaction, opening
the possibility for stand-alone implementations without Zotero (as
pandoc_ does)
- zrst2rst script allows the generation of plain RST files from Zotero
enabled files, for distribution to others

The new version is currently available only as part of zotero-plain:

- http://e6h.org/~egh/hg/zotero-plain
- or http://bitbucket.org/egh/zotero-plain

but should be available as version 0.2 on PyPI after a little more
testing.

What is zot4rst?
~~~~~~~~~~~~~~~~

zot4rst is an extension to docutils_ that allows users to write RST


28 Sep 16:24 2011

### Using rest for more-structured content

Hi all,

I'm considering writing a Python tutorial site with embedded executable
exercises.  I'd like to use ReST for the content, but I'm having trouble
finding exemplars for the embedded exercises.  An exercise will have a
number of components: name, starting code (often empty), supporting
named files, instructor-supplied tests to run on the results, and so
on.  If I were using XML, I'd use an <exercise> tag, with name="",
<usercode>, <tests>, <file>, and so on sub-elements.

A single page of tutorial could of course have multiple exercises.

What would be the natural way to express something like this in ReST?
I'd like to be able to process the result so that a page contains
exercises, but also possibly, the exercises are available as standalone
objects I could serve separately.  Hints as to how to go about extending
docutils to handle the format would be appreciated also.

I'm not a subscriber to this list, so cc's are appreciated.

Thanks.

--Ned.

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1


29 Sep 10:46 2011

### Re: Using rest for more-structured content

On 2011-09-28, Ned Batchelder wrote:

> I'm considering writing a Python tutorial site with embedded executable
> exercises.  I'd like to use ReST for the content, but I'm having trouble
> finding exemplars for the embedded exercises.  An exercise will have a
> number of components: name, starting code (often empty), supporting
> named files, instructor-supplied tests to run on the results, and so
> on.  If I were using XML, I'd use an <exercise> tag, with name="",
><usercode>, <tests>, <file>, and so on sub-elements.

> A single page of tutorial could of course have multiple exercises.

> What would be the natural way to express something like this in ReST?

> I'd like to be able to process the result so that a page contains
> exercises, but also possibly, the exercises are available as standalone
> objects I could serve separately.  Hints as to how to go about extending
> docutils to handle the format would be appreciated also.

I don't think there is *one* "natural" way. Depending on the exact task,
I can imagine:

* Using Sphinx_ for the complete project. This would generate a
complete "site", facilitate inter-document links and offers more
configuration options (skipping elements with/without a special class
argument value etc.)

.. _Sphinx: http://sphinx.pocoo.org

* Separate files for every exercise. The tutorial would .. include::