Kamu | 16 Jun 2013 07:53
Picon
Gravatar

docutils mirror out of date

Hello,

Just a quick tip: the mirror repo at http://repo.or.cz/w/docutils.git seems to be fetching from the old SVN url. It should now be:
Thanks.

Kamu
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
Arfrever | 12 Jun 2013 19:02

[docutils:bugs] #237 Traceback with Pillow and Python 3

[bugs:#237] Traceback with Pillow and Python 3

Status: open
Created: Wed Jun 12, 2013 05:02 PM UTC by Arfrever
Last Updated: Wed Jun 12, 2013 05:02 PM UTC
Owner: nobody

Pillow is actively maintained fork of PIL. Pillow >=2.0.0 supports Python 3. Docutils passes a bytes argument to PIL.Image.open(), which expects a str argument.

$ cat test.rst .. image:: file.png :scale: 50 $ rst2html.py-3.3 --traceback test.rst Traceback (most recent call last): File "/usr/bin/rst2html.py-3.3", line 23, in <module> publish_cmdline(writer_name='html', description=description) File "/usr/lib64/python3.3/site-packages/docutils/core.py", line 352, in publish_cmdline config_section=config_section, enable_exit_status=enable_exit_status) File "/usr/lib64/python3.3/site-packages/docutils/core.py", line 219, in publish output = self.writer.write(self.document, self.destination) File "/usr/lib64/python3.3/site-packages/docutils/writers/__init__.py", line 80, in write self.translate() File "/usr/lib64/python3.3/site-packages/docutils/writers/html4css1/__init__.py", line 173, in translate self.document.walkabout(visitor) File "/usr/lib64/python3.3/site-packages/docutils/nodes.py", line 174, in walkabout if child.walkabout(visitor): File "/usr/lib64/python3.3/site-packages/docutils/nodes.py", line 166, in walkabout visitor.dispatch_visit(self) File "/usr/lib64/python3.3/site-packages/docutils/nodes.py", line 1627, in dispatch_visit return method(node) File "/usr/lib64/python3.3/site-packages/docutils/writers/html4css1/__init__.py", line 1036, in visit_image imagepath.encode(sys.getfilesystemencoding())) File "/usr/lib64/python3.3/site-packages/PIL/Image.py", line 1992, in open prefix = fp.read(16) AttributeError: 'bytes' object has no attribute 'read'

Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/docutils/bugs/237/

To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
Christian Weiske | 11 Jun 2013 14:37
Picon
Favicon
Gravatar

image gallery

Hi,

I'd like to add an image gallery in HTML from a rST document.
The "gallery" is basically a list of image thumbnails beside each other
that can be clicked to open the original (large) image.

I thought about giving each image in the gallery a "gallery" field, as
in:

> .. image:: picture1.jpeg
>   :gallery: 1
> .. image:: picture2.jpeg
>   :gallery: 1
> .. image:: picture3.jpeg
>   :gallery: 2

This would put pic1 + 2 in one gallery, and 3 in a separate one.

This would only work with a custom renderer of course, since the
gallery field is not supported anywhere.

I see two problems with this:

1. Since the "gallery" field is not supported by standard renderers,
   this is not backward-compatible
2. The renderer does not get notified when the gallery begins, and when
   it ends.

Do you people know of existing rST markup to do image galleries? If
not, what would be the best way (markup-wise) to get them?

--

-- 
Viele Grüße
Christian Weiske

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Docutils-develop mailing list
Docutils-develop <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-develop

Please use "Reply All" to reply to the list.
"Günter Milde" | 4 Jun 2013 14:51

[docutils:patches] #83 Fix latex produced for DUrole

  • status: pending-remind --> closed-rejected
  • Group: --> Unstable_(example)

[patches:#83] Fix latex produced for DUrole

Status: closed-rejected
Created: Sat Aug 13, 2011 12:37 AM UTC by Anonymous
Last Updated: Mon Jan 30, 2012 08:57 AM UTC
Owner: nobody

Currently the definition for DUrole is not valid tex and contains too much whitespace (which shows up if used in an environment that preserves whitespace)
Taking out spaces and adding { } fixes both these problems.

Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/docutils/patches/83/

To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
"Günter Milde" | 4 Jun 2013 14:47

[docutils:patches] #105 Fix coding: utf8 -> utf-8 (with dash) header in Python files

  • status: open --> closed-fixed

[patches:#105] Fix coding: utf8 -> utf-8 (with dash) header in Python files

Status: closed-fixed
Created: Thu May 23, 2013 10:43 AM UTC by Sergey Shepelev
Last Updated: Tue Jun 04, 2013 12:47 PM UTC
Owner: nobody

When I run manage.py makemessages --all in some closed source Django project which uses docutils installed in virtualenv, I get this error:

Error: errors happened while running xgettext on lt.py
xgettext: ./venv/lib/python2.7/site-packages/docutils/parsers/rst/languages/lt.py:1: Unknown encoding "utf8". Proceeding with ASCII instead.
xgettext: Non-ASCII string at ./venv/lib/python2.7/site-packages/docutils/parsers/rst/languages/lt.py:21.
Please specify the source encoding through --from-code or through a comment
as specified in http://www.python.org/peps/pep-0263.html.

While Python itself is liberate enough on # encoding header, by standard proper name of UTF-8 includes dash.

Please, accept this patch that changes coding header to utf-8 with dash. It fixes my problem.

Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/docutils/patches/105/

To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
"Günter Milde" | 4 Jun 2013 14:47

[docutils:patches] #105 Fix coding: utf8 -> utf-8 (with dash) header in Python files

I agree that a consistent naming is preferable and will change the comments to
"coding: utf-8". -> Done in revision 7668

However, please consider a bug report to the used Python variant, as both
utf8 and utf-8 are valid aliases for the codec "utf_8".
(I cannot see a preference for an alias with hyphen in
http://docs.python.org/2/library/codecs.html)

[patches:#105] Fix coding: utf8 -> utf-8 (with dash) header in Python files

Status: open
Created: Thu May 23, 2013 10:43 AM UTC by Sergey Shepelev
Last Updated: Thu May 23, 2013 10:43 AM UTC
Owner: nobody

When I run manage.py makemessages --all in some closed source Django project which uses docutils installed in virtualenv, I get this error:

Error: errors happened while running xgettext on lt.py
xgettext: ./venv/lib/python2.7/site-packages/docutils/parsers/rst/languages/lt.py:1: Unknown encoding "utf8". Proceeding with ASCII instead.
xgettext: Non-ASCII string at ./venv/lib/python2.7/site-packages/docutils/parsers/rst/languages/lt.py:21.
Please specify the source encoding through --from-code or through a comment
as specified in http://www.python.org/peps/pep-0263.html.

While Python itself is liberate enough on # encoding header, by standard proper name of UTF-8 includes dash.

Please, accept this patch that changes coding header to utf-8 with dash. It fixes my problem.

Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/docutils/patches/105/

To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
Ruzanov Vladimir | 2 Jun 2013 17:04

[docutils:bugs] #236 'table' node tree needs 'colspec' node in 'tgroup'

[bugs:#236] 'table' node tree needs 'colspec' node in 'tgroup'

Status: open
Created: Sun Jun 02, 2013 03:04 PM UTC by Ruzanov Vladimir
Last Updated: Sun Jun 02, 2013 03:04 PM UTC
Owner: nobody

I add some lines in rst2html.py just for testing my own 'mytable' directive and get this

/tmp/docutils-code/docutils/tools $ echo ".. mytable::" | PYTHONPATH="../" ./rst2html.py --trace
Traceback (most recent call last):
File "./rst2html.py", line 48, in
publish_cmdline(writer_name='html', description=description)
File "/tmp/docutils-code/docutils/docutils/core.py", line 352, in publish_cmdline
config_section=config_section, enable_exit_status=enable_exit_status)
File "/tmp/docutils-code/docutils/docutils/core.py", line 219, in publish
output = self.writer.write(self.document, self.destination)
File "/tmp/docutils-code/docutils/docutils/writers/init.py", line 80, in write
self.translate()
File "/tmp/docutils-code/docutils/docutils/writers/html4css1/init.py", line 176, in translate
self.document.walkabout(visitor)
File "/tmp/docutils-code/docutils/docutils/nodes.py", line 174, in walkabout
if child.walkabout(visitor):
File "/tmp/docutils-code/docutils/docutils/nodes.py", line 174, in walkabout
if child.walkabout(visitor):
File "/tmp/docutils-code/docutils/docutils/nodes.py", line 174, in walkabout
if child.walkabout(visitor):
File "/tmp/docutils-code/docutils/docutils/nodes.py", line 174, in walkabout
if child.walkabout(visitor):
File "/tmp/docutils-code/docutils/docutils/nodes.py", line 174, in walkabout
if child.walkabout(visitor):
File "/tmp/docutils-code/docutils/docutils/nodes.py", line 166, in walkabout
visitor.dispatch_visit(self)
File "/tmp/docutils-code/docutils/docutils/nodes.py", line 1882, in dispatch_visit
return method(node)
File "/tmp/docutils-code/docutils/docutils/writers/html4css1/init.py", line 798, in visit_entry
if node.parent.parent.parent.stubs[node.parent.column]:
IndexError: list index out of range

My rst2html.py -- BOF -- #!/usr/bin/python try: import locale locale.setlocale(locale.LC_ALL, '') except: pass from docutils.core import publish_cmdline, default_description from docutils.parsers.rst import directives from docutils.parsers.rst.directives.tables import Table from docutils import nodes class MyTable(Table): def run(self): table = nodes.table() tgroup = nodes.tgroup(cols=2) table += tgroup #colspec = nodes.colspec(colwidth=1) #tgroup += colspec tbody = nodes.tbody() row_node = nodes.row() entry = nodes.entry() cell = nodes.paragraph(text='a') entry += cell row_node += entry tbody += row_node tgroup += tbody return [table] directives.register_directive('mytable', MyTable) description = ('Generates (X)HTML documents from standalone reStructuredText ' 'sources. ' + default_description) publish_cmdline(writer_name='html', description=description) -- EOF --

If I uncomment two lines in rst2html.py then everything will work.
I think that 'colspec' node is not necessary.

And this line in "docutils/docutils/writers/html4css1/init.py"
...
if node.parent.parent.parent.stubs[node.parent.column]:
...
does not check things.

Docutils version: rst2html.py (Docutils 0.11 [repository], Python 2.7.3, on linux2)

Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/docutils/bugs/236/

To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
eliben | 29 May 2013 23:45
Picon
Gravatar

Emit ReST back from docutils?

Hello,

I want to read ReST into a representation I can manipulate programmatically
(say with publish_doctree) and then output the file back in ReST format.
Does docutils have a "ReST writer" or some similar interface to achieve that?

Thanks in advance.

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
Sergey Shepelev | 23 May 2013 12:43

[docutils:patches] #105 Fix coding: utf8 -> utf-8 (with dash) header in Python files

[patches:#105] Fix coding: utf8 -> utf-8 (with dash) header in Python files

Status: open
Created: Thu May 23, 2013 10:43 AM UTC by Sergey Shepelev
Last Updated: Thu May 23, 2013 10:43 AM UTC
Owner: nobody

When I run manage.py makemessages --all in some closed source Django project which uses docutils installed in virtualenv, I get this error:

Error: errors happened while running xgettext on lt.py
xgettext: ./venv/lib/python2.7/site-packages/docutils/parsers/rst/languages/lt.py:1: Unknown encoding "utf8". Proceeding with ASCII instead.
xgettext: Non-ASCII string at ./venv/lib/python2.7/site-packages/docutils/parsers/rst/languages/lt.py:21.
Please specify the source encoding through --from-code or through a comment
as specified in http://www.python.org/peps/pep-0263.html.

While Python itself is liberate enough on # encoding header, by standard proper name of UTF-8 includes dash.

Please, accept this patch that changes coding header to utf-8 with dash. It fixes my problem.

Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/docutils/patches/105/

To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
Jakub Wilk | 18 May 2013 18:49

[docutils:bugs] #200 odf writer fails when run with Python3.3b1

In Python 2.5 and 2.6, as well as in the standalone ElementTree module, etree.Element is a factory function, not a class.

Reference:
http://effbot.org/zone/pythondoc-elementtree-ElementTree.htm#elementtree.ElementTree.Element-function

[bugs:#200] odf writer fails when run with Python3.3b1

Status: open
Created: Tue Aug 07, 2012 07:32 PM UTC by Anonymous
Last Updated: Thu May 16, 2013 09:02 PM UTC
Owner: nobody

A few of the tests in test_writers.test_odt.DocutilsOdtTestCase fail when run against Python 3.3b1, with tracebacks of the form:

======================================================================
ERROR: test_odt_basic (test_writers.test_odt.DocutilsOdtTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/david/coding/python3.3/python-docutils/python3-python-docutils-0.10-0.2.20120730svn7490.fc18/test3/test_writers/test_odt.py", line 151, in test_odt_basic
self.process_test('odt_basic.txt', 'odt_basic.odt',
File "/home/david/coding/python3.3/python-docutils/python3-python-docutils-0.10-0.2.20120730svn7490.fc18/test3/test_writers/test_odt.py", line 104, in process_test
settings_overrides=settings_overrides)
File "/home/david/coding/python3.3/python-docutils/python3-python-docutils-0.10-0.2.20120730svn7490.fc18/build/lib/docutils/core.py", line 414, in publish_string
enable_exit_status=enable_exit_status)
File "/home/david/coding/python3.3/python-docutils/python3-python-docutils-0.10-0.2.20120730svn7490.fc18/build/lib/docutils/core.py", line 662, in publish_programmatically
output = pub.publish(enable_exit_status=enable_exit_status)
File "/home/david/coding/python3.3/python-docutils/python3-python-docutils-0.10-0.2.20120730svn7490.fc18/build/lib/docutils/core.py", line 219, in publish
output = self.writer.write(self.document, self.destination)
File "/home/david/coding/python3.3/python-docutils/python3-python-docutils-0.10-0.2.20120730svn7490.fc18/build/lib/docutils/writers/__init__.py", line 80, in write
self.translate()
File "/home/david/coding/python3.3/python-docutils/python3-python-docutils-0.10-0.2.20120730svn7490.fc18/build/lib/docutils/writers/odf_odt/__init__.py", line 548, in translate
self.visitor = self.translator_class(self.document)
File "/home/david/coding/python3.3/python-docutils/python3-python-docutils-0.10-0.2.20120730svn7490.fc18/build/lib/docutils/writers/odf_odt/__init__.py", line 822, in __init__
SubElement(root, 'office:scripts')
File "/home/david/coding/python3.3/python-docutils/python3-python-docutils-0.10-0.2.20120730svn7490.fc18/build/lib/docutils/writers/odf_odt/__init__.py", line 287, in SubElement
parent.append(el)
File "/usr/lib64/python3.3/xml/etree/ElementTree.py", line 280, in append
self._assert_is_element(element)
File "/usr/lib64/python3.3/xml/etree/ElementTree.py", line 305, in _assert_is_element
raise TypeError('expected an Element, not %s' % type(e).__name__)
TypeError: expected an Element, not _ElementInterfaceWrapper

These assertions are due to type-checking that was added in Python 3.3 to xml.etree - this was http://bugs.python.org/issue13782 ("xml.etree.ElementTree: Element.append doesn't type-check its argument").

What I think is happening is that _ElementInterfaceWrapper is a subclass of the Element class defined in xml/etree/ElementTree.py, but that file later has this code:
# Import the C accelerators
try:
# Element, SubElement, ParseError, TreeBuilder, XMLParser
from _elementtree import *
except ImportError:
pass
which happens after _ElementInterfaceWrapper has been set; hence that type-checking is expecting Element to be a _elementree.Element, rather than the pure-python Element implementation.

Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/docutils/bugs/200/

To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
Jakub Wilk | 16 May 2013 23:42

[docutils:bugs] #210 More tests failures with Python 3.3

I should have mentioned that 3.3 is not the only version that is affected, as http://bugs.python.org/issue16013 has been backported to other branches. More specifically, these are the versions in which the patch was introduced:

  • 2.7.4
  • 3.2.4
  • 3.3.1

[bugs:#210] More tests failures with Python 3.3

Status: closed-fixed
Created: Fri Nov 02, 2012 06:37 PM UTC by Dmitry Shachnev
Last Updated: Thu May 16, 2013 08:39 PM UTC
Owner: nobody

[ Note that I'm using 20121021 snapshot from python 3.3 branch. ]

Full log is here: http://paste.ubuntu.com/1327088/.

One of failing tests:

======================================================================
FAIL: test_parsers/test_rst/test_directives/test_tables.py: totest['csv-table'][18]; test_parser (DocutilsTestSupport.ParserTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/tmp.aJx8sUfgDT/tree0t-python3-docutils-testtmp/adttmp/test/DocutilsTestSupport.py", line 456, in test_parser
self.compare_output(self.input, output, self.expected)
File "/tmp/tmp.aJx8sUfgDT/tree0t-python3-docutils-testtmp/adttmp/test/DocutilsTestSupport.py", line 227, in compare_output
raise error
File "/tmp/tmp.aJx8sUfgDT/tree0t-python3-docutils-testtmp/adttmp/test/DocutilsTestSupport.py", line 214, in compare_output
self.assertEqual(output, expected)
File "/tmp/tmp.aJx8sUfgDT/tree0t-python3-docutils-testtmp/adttmp/test/DocutilsTestSupport.py", line 119, in assertEqual
raise self.failureException(msg or '%s != %s' % _format_str(first, second))
AssertionError: '''\ <document source="test data">
<table>
<title>
bad CSV data
<tgroup cols="2">
<colspec colwidth="50">
<colspec colwidth="50">
<tbody>
<row>
<entry>
<paragraph>
bad
<entry>
<paragraph>
csv, data''' != '''\ <document source="test data">
<system_message level="3" line="1" source="test data" type="ERROR">
<paragraph>
Error with CSV data in "csv-table" directive:
newline inside string
<literal_block xml:space="preserve">
.. csv-table:: bad CSV data
\n\ "bad", "csv, data'''

Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/docutils/bugs/210/

To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d

Gmane