<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.text.docutils.cvs">
    <title>gmane.text.docutils.cvs</title>
    <link>http://blog.gmane.org/gmane.text.docutils.cvs</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.cvs/7711"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.cvs/7710"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.cvs/7709"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.cvs/7708"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.cvs/7707"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.cvs/7706"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.cvs/7705"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.cvs/7704"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.cvs/7703"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.cvs/7702"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.cvs/7701"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.cvs/7700"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.cvs/7699"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.cvs/7698"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.cvs/7697"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.cvs/7696"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.cvs/7695"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.cvs/7694"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.cvs/7693"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.cvs/7692"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.cvs/7711">
    <title>SF.net SVN: docutils:[7436]trunk/sandbox/rst2wiki/docutils/writers/wiki.py</title>
    <link>http://comments.gmane.org/gmane.text.docutils.cvs/7711</link>
    <description>&lt;pre&gt;Revision: 7436
          http://docutils.svn.sourceforge.net/docutils/?rev=7436&amp;amp;view=rev
Author:   joshuagraff
Date:     2012-05-24 17:48:15 +0000 (Thu, 24 May 2012)
Log Message:
-----------
Added support for escaping linked words. i.e. words which are
automatically linked in a Wiki. The option --escape-linked-words
takes a file of words to be escaped.

Updated Confluence translater to always escape '[]' and '{}' with
exception to literal blocks.

Modified Paths:
--------------
    trunk/sandbox/rst2wiki/docutils/writers/wiki.py

Modified: trunk/sandbox/rst2wiki/docutils/writers/wiki.py
===================================================================
--- trunk/sandbox/rst2wiki/docutils/writers/wiki.py2012-05-12 04:35:29 UTC (rev 7435)
+++ trunk/sandbox/rst2wiki/docutils/writers/wiki.py2012-05-24 17:48:15 UTC (rev 7436)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -22,6 +22,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 import os
+import re
 
 from docutils import nodes, writers, languages
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -40,6 +41,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
          'Valid options: %s' % ('twiki', ', '.join(supported)),
          ['--wiki'], {'default': 'twiki',
                       'choices': supported}),
+        ('File containing linked words to escape.',
+         ['--escape-linked-words'], {'default': None}),
         ))
     def __init__(self):
         writers.Writer.__init__(self)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -97,6 +100,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
         self.in_paragraph = False
         self.first_list_paragraph = False
         self.footnote_refs = dict()
+        self.escape_words = list()
+        if (self.settings.escape_linked_words and
+            os.path.exists(self.settings.escape_linked_words)):
+            fd = open(self.settings.escape_linked_words)
+            try:
+                self.escape_words = [line.strip() for line in fd.readlines()]
+            finally:
+                fd.close()
+        self.escape_word_start = ''
+        self.escape_word_end = ''
 
     def astext(self):
         for idx, item in enumerate(self.body):
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -146,6 +159,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
             if ((self.in_paragraph and self.list_level) and
                 not self.first_list_paragraph):
                 text = '%s%s' % (self.list_indent(), text)
+        
+        if not self.in_literal_block:
+            for word in self.escape_words:
+                pattern = r'(?P&amp;lt;start&amp;gt;\b)%s(?P&amp;lt;end&amp;gt;\b)' % word
+                repl = r'\g&amp;lt;start&amp;gt;%s%s%s\g&amp;lt;end&amp;gt;' % \
+                       (self.escape_word_start, word,
+                        self.escape_word_end)
+                text = re.sub(pattern, repl, text)
         self.body.append(text)
         
     def depart_Text(self, node):
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -865,8 +886,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
         self.option_group_end = ' &amp;lt;/td&amp;gt;'
         self.description_start = '&amp;lt;td&amp;gt; '
         self.description_end = ' &amp;lt;/td&amp;gt;'
+        self.escape_word_start = '!'
         
-        
     def escape(self, text):
         if self.in_table:
             text = text.replace('\n', ' \\\n')
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1035,13 +1056,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
         self.description_start = '{column:width=80%}'
         self.description_end = '{column}'
         self.section_anchors = list()          # Track section anchors we have seen
+        self.escape_word_start = '{nl:'
+        self.escape_word_end = '}'
         
     def escape(self, text):
         if not (self.in_literal or self.in_literal_block):
-            text = text.replace('[', '\[')
-            text = text.replace(']', '\]')
-            text = text.replace('{', '\{')
-            text = text.replace('}', '\}')
             text = text.replace(':', '&amp;amp;#58;')
         if self.in_literal:
             text = text.replace('*', '\*')
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1049,6 +1068,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
         if not self.in_literal_block:
             text = text.replace('-', '\-')
             text = text.replace('!', '\!')
+            text = text.replace('[', '\[')
+            text = text.replace(']', '\]')
+            text = text.replace('{', '\{')
+            text = text.replace('}', '\}')
         return text
     
     def title_prefix(self):

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>joshuagraff&lt; at &gt;users.sourceforge.net</dc:creator>
    <dc:date>2012-05-24T17:48:15</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.cvs/7710">
    <title>SF.net SVN: docutils:[7435] trunk/sandbox</title>
    <link>http://comments.gmane.org/gmane.text.docutils.cvs/7710</link>
    <description>&lt;pre&gt;Revision: 7435
          http://docutils.svn.sourceforge.net/docutils/?rev=7435&amp;amp;view=rev
Author:   joshuagraff
Date:     2012-05-12 04:35:29 +0000 (Sat, 12 May 2012)
Log Message:
-----------
Initial checkin of RST to Wiki frontend

Added Paths:
-----------
    trunk/sandbox/rst2wiki/
    trunk/sandbox/rst2wiki/README.txt
    trunk/sandbox/rst2wiki/docutils/
    trunk/sandbox/rst2wiki/docutils/writers/
    trunk/sandbox/rst2wiki/docutils/writers/wiki.py
    trunk/sandbox/rst2wiki/tools/
    trunk/sandbox/rst2wiki/tools/rst2wiki.py

Added: trunk/sandbox/rst2wiki/README.txt
===================================================================
--- trunk/sandbox/rst2wiki/README.txt                        (rev 0)
+++ trunk/sandbox/rst2wiki/README.txt2012-05-12 04:35:29 UTC (rev 7435)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,90 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+========
+rst2wiki
+========
+
+.. contents::
+
+
+What is rst2wiki?
+=================
+
+``rst2wiki`` is a tool that transforms reStructuredText_ into various
+Wiki texts. To date ``rst2wiki`` supports two Wiki texts TWiki_ and 
+Atlassian Confluence_.
+
+
+Usage
+=====
+
+``rst2wiki.py`` currently has one option ``--wiki`` beyond "General", 
+"Parser", and "Standalone" options.
+
+Example::
+
+  # TWiki text
+  $ rst2wiki.py --wiki twiki test.rst test.twiki
+  
+  # Confluence text
+  $ rst2wiki.py --wiki confluence test.rst test.confluence
+
+By default ``rst2wiki.py`` will generate TWiki text.
+
+
+Availability
+============
+
+``rst2wiki`` is available through the `Docutils Subversion repository`_
+as part of the Docutils sandbox in ``sandbox/rst2wiki``.
+
+
+Contact
+=======
+
+If you have questions, patches, etc ... feel free to contact me at: joshua.graff&amp;lt; at &amp;gt;ccrypt.org
+
+
+Installation
+============
+
+Currently, ``rst2wiki`` requires you copy the frontend tool ``rst2wiki.py``
+and writer ``wiki.py`` into the appropriate directories under your docutils
+install.
+
+Example::
+
+  $ cd &amp;lt;rst2wiki sandbox&amp;gt;/tools
+  $ dirname `which rst2html.py`
+  &amp;lt;bin path&amp;gt;  
+  $ cp rst2wiki.py &amp;lt;bin path&amp;gt; 
+  $ cd &amp;lt;rst2wiki sandbox&amp;gt;/docutils/writers
+  $ cp wiki.py &amp;lt;path to docutils install&amp;gt;/writers
+
+
+Copyright and license
+=====================
+
+Copyright (C) 2012 by Joshua Graff
+
+License is BSD_ 2-Clause
+
+
+TODO
+====
+
+* Add some actual automated tests
+
+* Expand support for a few more Wiki dialects
+
+
+Links
+=====
+
+.. _reStructuredText: http://docutils.sourceforge.net/rst.html
+
+.. _TWiki: http://twiki.org
+
+.. _Confluence: http://www.atlassian.com/software/confluence/overview
+
+.. _Docutils Subversion repository: http://docutils.sourceforge.net/docs/dev/repository.html
+
+.. _BSD: http://www.opensource.org/licenses/BSD-2-Clause
\ No newline at end of file

Added: trunk/sandbox/rst2wiki/docutils/writers/wiki.py
===================================================================
--- trunk/sandbox/rst2wiki/docutils/writers/wiki.py                        (rev 0)
+++ trunk/sandbox/rst2wiki/docutils/writers/wiki.py2012-05-12 04:35:29 UTC (rev 7435)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,1124 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+# Copyright (c) 2012, Joshua Graff
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+#     1. Redistributions of source code must retain the above copyright notice, this
+#        list of conditions and the following disclaimer.
+#     2. Redistributions in binary form must reproduce the above copyright notice,
+#        this list of conditions and the following disclaimer in the documentation
+#        and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+#  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import os
+
+from docutils import nodes, writers, languages
+
+
+class Writer(writers.Writer):
+
+    supported = ('twiki', 'confluence')
+
+    output = None
+
+    settings_spec = (
+        'Wiki-Specific Options',
+        None,
+        (
+        ('Specify Wiki markup language (default \'%s\'). '
+         'Valid options: %s' % ('twiki', ', '.join(supported)),
+         ['--wiki'], {'default': 'twiki',
+                      'choices': supported}),
+        ))
+    def __init__(self):
+        writers.Writer.__init__(self)
+
+    def translate(self):
+        if self.document.settings.wiki == 'twiki':
+            visitor = TWikiTranslator(self.document)
+        elif self.document.settings.wiki == 'confluence':
+            visitor = ConfluenceTranslator(self.document)
+        self.document.walkabout(visitor)
+        self.output = visitor.astext()
+
+
+class WikiTranslator(nodes.NodeVisitor):
+    
+    def __init__(self, document):
+        nodes.NodeVisitor.__init__(self, document)
+        self.settings = settings = document.settings
+        lcode = settings.language_code
+        self.language = languages.get_language(lcode, document.reporter)
+        self.body = list()
+        self.context = list()
+        self.section_level = 1
+        self.section_refs = dict()
+        self.list_level = 0
+        self.list_type = list()
+        self.emphasis_start = None
+        self.emphasis_end = None
+        self.strong_start = None
+        self.strong_end = None
+        self.literal_start = None
+        self.literal_end = None
+        self.title_reference_start = None
+        self.title_reference_end = None
+        self.in_literal = False
+        self.in_literal_block = False
+        self.literal_block_start = None
+        self.literal_block_end = None
+        self._literal_block_indent = 0
+        self.in_table = False
+        self.in_table_header = False
+        self.table_header_width = 0
+        self.table_entry_width = 0
+        self.table_header_sep = None
+        self.table_entry_sep = None
+        self.description = None
+        self.toc = None
+        self.block_quote_start = None
+        self.block_quote_end = None
+        self.in_definition_list = False
+        self.definition_start = None
+        self.definition_end = None
+        self.definition_term_start = None
+        self.definition_term_end = None
+        self.in_paragraph = False
+        self.first_list_paragraph = False
+        self.footnote_refs = dict()
+
+    def astext(self):
+        for idx, item in enumerate(self.body):
+            if not isinstance(item, tuple):
+                continue
+            #
+            # We have encountered a tuple which represents
+            # a function we have to render to extract text.
+            #
+            # Deferred functions like this are often used
+            # to render links which must wait till we walk
+            # the document for link discovery.
+            # 
+            fn = item[0]
+            args = item[1:]
+            text = fn(*args)
+            if not text:
+                text = ''
+            self.body[idx] = text
+        return ''.join(self.body)
+    
+    def escape(self, text):
+        return text    
+
+    def strip(self):
+        """Remove all whitespace at the end of self.body."""
+        while self.body and not self.body[-1].strip():
+            self.body.pop()
+        self.body[-1] = self.body[-1].rstrip()
+
+    def visit_document(self, node):
+        pass
+
+    def depart_document(self, node):
+        self.body.append('\n')
+
+    def visit_Text(self, node):
+        text = node.astext()
+        if (self.in_paragraph or self.list_level) and not self.in_literal_block:
+            text = text.replace('\n', ' ') # join lines split in a paragraph
+        text = self.escape(text)
+        if self.in_literal_block:
+            text = ''.join(['%s%s' % (self.literal_block_indent(), line)
+                            for line in text.splitlines(True)])
+        elif (isinstance(self.body[-1], basestring) and
+              self.body[-1].endswith('\n')):
+            if ((self.in_paragraph and self.list_level) and
+                not self.first_list_paragraph):
+                text = '%s%s' % (self.list_indent(), text)
+        self.body.append(text)
+        
+    def depart_Text(self, node):
+        pass
+    
+    def visit_comment(self, node):
+        raise nodes.SkipNode
+
+    def depart_comment(self):
+        pass
+    
+    def visit_paragraph(self, node):
+        self.in_paragraph = True
+    
+    def depart_paragraph(self, node):
+        # newline may be escaped within a table
+        newline = self.escape('\n')
+        if not self.in_table:
+            if not isinstance(node.parent, nodes.list_item):
+                self.body.append(newline)
+            self.body.append(newline)
+        self.in_paragraph = False
+        self.first_list_paragraph = False
+
+    ##
+    # Table of contents
+    #
+    def visit_topic(self, node):
+        self.body.append(self.toc)
+        self.body.append('\n')
+        self.section_level -= 1
+        raise nodes.SkipNode
+
+    def depart_topic(self, node):
+        pass
+    #
+    # End table of contents
+    ##
+        
+    ##
+    # Title/Section
+    #
+    def visit_section(self, node):
+        if node['ids']:
+            self.context.append(node['ids'])
+        self.section_level += 1
+        self.body.append('\n')
+
+    def depart_section(self, node):
+        self.section_level -= 1
+        
+    def title_prefix(self):
+        """A method which returns a title prefix based on self.section_level.
+
+        self.section_level will be the current title depth from 1 - N where
+        1 is the highest thus top most title.
+        """
+        pass
+
+    def title_anchor(self, title):
+        """A method which returns the anchor which will be autogenerated
+        for title.
+        """
+        return title
+    
+    def visit_title(self, node):
+        if self.context:
+            anchor = self.title_anchor(node.astext())
+            for refid in self.context.pop():
+                self.section_refs[refid] = anchor
+        self.body.append(self.title_prefix())
+
+    def depart_title(self, node):
+        self.body.append('\n\n')
+    #
+    #
+    ##
+
+    ###
+    # Paragraphs emphasis
+    #
+    def visit_literal(self, node):
+        if self.literal_start:
+            self.body.append(self.literal_start)
+        self.in_literal = True
+        
+    def depart_literal(self, node):
+        if self.literal_end:
+            self.body.append(self.literal_end)
+        self.in_literal = False            
+
+    def visit_emphasis(self, node):
+        if self.emphasis_start:
+            self.body.append(self.emphasis_start)
+
+    def depart_emphasis(self, node):
+        if self.emphasis_end:
+            self.body.append(self.emphasis_end)
+
+    def visit_strong(self, node):
+        if self.strong_start:
+            self.body.append(self.strong_start)
+
+    def depart_strong(self, node):
+        if self.strong_end:
+            self.body.append(self.strong_end)
+
+    def visit_title_reference(self, node):
+        if self.title_reference_start:
+            self.body.append(self.title_reference_start)
+
+    def depart_title_reference(self, node):
+        if self.title_reference_end:
+            self.body.append(self.title_reference_end)
+    #
+    #
+    ##
+
+    ###
+    # Blocks
+    # NOTE: For block quotes we only quote raw text, and never
+    #       anything that would result in markup
+    #
+    def visit_block_quote(self, node):
+        for child in node.children:
+            if not isinstance(child, nodes.paragraph):
+                return
+
+        if self.block_quote_start:
+            self.body.append(self.block_quote_start)
+            self.body.append('\n')
+            
+    def depart_block_quote(self, node):
+        for child in node.children:
+            if not isinstance(child, nodes.paragraph):
+                return
+        if self.block_quote_end:
+            if not self.body[-1].endswith('\n'):
+                self.body.append('\n')
+            self.body.append(self.block_quote_end)
+            self.body.append('\n')
+
+    def literal_block_indent(self):
+        """Add indent space to all literal blocks. Take into account
+        the depth of a list.
+        """
+        return ' ' * self._literal_block_indent
+
+    def visit_literal_block(self, node):
+        self.in_literal_block = True
+        if self.literal_block_start:
+            self.body.append('%s%s' % (self.list_indent(),
+                                       self.literal_block_start))
+            self.body.append('\n')
+
+    def depart_literal_block(self, node):
+        self.in_literal_block = False
+        if self.literal_block_end:
+            if not self.body[-1].endswith('\n'):
+                self.body.append('\n')
+            self.body.append('%s%s' % (self.list_indent(),
+                                       self.literal_block_end))
+            self.body.append('\n')
+
+    def visit_attribution(self, node):
+        self.visit_block_quote(node)
+        
+    def depart_attribution(self, node):
+        self.depart_block_quote(node)
+    #
+    #
+    ##
+
+    ###
+    # List items
+    #
+    def list_prefix(self, type):
+        """A method which returns a list prefix based on the list's type
+        and self.list_level.
+
+        Where: 
+          type: will be 'bullet', 'definition', 'enumerated', 'field',
+                or 'option'
+          self.list_level is 1 - N
+        """
+        pass
+
+    def list_indent(self):
+        """Returns a whitespace string which will indent text to the
+        current list level.
+        """
+        if self.list_level:
+            return (' ' * (self.list_level)) + ' '
+        return ''
+
+    def visit_list_item(self, node):
+        # No extra whitespace between list items
+        if not self.list_start:
+            self.strip()
+            self.body.append('\n')
+        self.body.append(self.list_prefix(self.list_type[-1]))
+        self.list_start = False
+        self.first_list_paragraph = True
+
+    def depart_list_item(self, node):
+        pass
+    
+    def visit_bullet_list(self, node):
+        if self.list_level == 0:
+            self.list_start = True
+        self.list_level += 1
+        self.list_type.append('bullet')
+        
+    def depart_bullet_list(self, node):
+        self.list_level -= 1
+        self.list_type.pop()
+        if self.list_level == 0:
+            self.body.append('\n')
+        
+    def visit_enumerated_list(self, node):
+        if self.list_level == 0:
+            self.list_start = True
+        self.list_level += 1
+        self.list_type.append('enumerated')
+
+    def depart_enumerated_list(self, node):
+        self.list_level -= 1
+        self.list_type.pop()
+        if self.list_level == 0:
+            self.body.append('\n')
+        
+    #
+    #
+    ###
+
+    ###
+    # Field lists
+    #
+    def visit_field(self, node):
+        pass
+
+    def depart_field(self, node):
+        pass
+
+    def visit_field_name(self, node):
+        self.body.append(self.strong_start)
+
+    def depart_field_name(self, node):
+        self.body.append(self.strong_end)
+        self.body.append(': ')
+
+    def visit_field_body(self, node):
+        pass
+
+    def depart_field_body(self, node):
+        pass
+
+    def visit_field_list(self, node):
+        pass
+
+    def depart_field_list(self, node):
+        pass
+    #
+    #
+    ###
+
+    ###
+    # Definition lists
+    #
+    def visit_definition_list(self, node):
+        if self.list_level == 0:
+            self.list_start = True
+        self.list_level += 1
+        self.in_definition_list = True
+        
+
+    def depart_definition_list(self, node):
+        self.list_level -= 1
+        self.in_definition_list = False
+
+    def visit_definition_list_item(self, node):
+        if not self.list_start:
+           self.strip()
+           self.body.append('\n')        
+        self.list_start = False
+
+    def depart_definition_list_item(self, node):
+        pass
+
+    def visit_term(self, node):
+        if self.definition_term_start:
+            self.body.append(self.definition_term_start)
+
+    def depart_term(self, node):
+        if self.definition_term_end:
+            self.body.append(self.definition_term_end)
+        else:
+            self.body.append('\n')            
+
+    def visit_definition(self, node):
+        if self.definition_start:
+            self.body.append(self.definition_start)
+
+    def depart_definition(self, node):
+        if self.definition_end:
+            self.body.append(self.definition_end)
+        else:
+            self.body.append('\n')                    
+    #
+    #
+    ###
+    
+    ###
+    # Table visitors
+    #
+    def visit_table(self, node):
+        self.in_table = True
+        self.table_header_width = 0
+
+    def depart_table(self, node):
+        self.in_table = False
+
+    def visit_entry(self, node):
+        if self.in_table_header:
+            self.body.append(self.table_header_sep)
+            self.table_header_width += 1
+        else:
+            self.body.append(self.table_entry_sep)
+            self.table_entry_width += 1
+
+    def depart_entry(self, node):
+        pass
+
+    def visit_row(self, node):
+        pass
+
+    def depart_row(self, node):
+        # Add end of table markup
+        if self.in_table_header:
+            self.body.append(self.table_header_sep)
+        else:
+            while self.table_entry_width &amp;lt; self.table_header_width:
+                self.body.append(self.table_entry_sep)
+                self.table_entry_width += 1
+            self.body.append(self.table_entry_sep)                
+                
+        self.body.append('\n')
+        self.table_entry_width = 0
+        
+    def visit_colspec(self, node):
+        pass
+
+    def depart_colspec(self, node):
+        pass
+
+    def visit_tgroup(self, node):
+        pass
+    
+    def depart_tgroup(self, node):
+        pass
+
+    def visit_thead(self, node):
+        self.in_table_header = True
+    
+    def depart_thead(self, node):
+        self.in_table_header = False
+
+    def visit_tbody(self, node):
+        pass
+    
+    def depart_tbody(self, node):
+        pass
+    #
+    # End Table
+    ###
+
+    ##
+    # Options
+    #
+    def visit_option(self, node):
+        pass
+    
+    def depart_option(self, node):
+        self.body.append(', ')
+
+    def visit_option_argument(self, node):
+        self.body.append('=')
+    
+    def depart_option_argument(self, node):
+        pass
+
+    def visit_option_string(self, node):
+        pass
+    
+    def depart_option_string(self, node):
+        pass
+
+    def visit_option_group(self, node):
+        self.body.append(self.option_group_start)
+        self.body.append(self.literal_start)
+    
+    def depart_option_group(self, node):
+        # XXX Remove extra comma
+        if self.body[-1] == ', ':
+            self.body.pop()
+        self.body.append(self.literal_end)
+        self.body.append(self.option_group_end)
+    
+    def visit_option_list(self, node):
+        if self.option_list_start:
+            self.body.append(self.option_list_start)
+        self.body.append(self.option_list_item_start)
+        self.body.append(self.option_group_start)
+        self.body.append(self.strong_start)
+        self.body.append("OPTION")
+        self.body.append(self.strong_end)
+        self.body.append(self.option_group_end)
+        self.body.append(self.description_start)
+        self.body.append(self.strong_start)
+        self.body.append("DESCRIPTION")
+        self.body.append(self.strong_end)
+        self.body.append(self.description_end)
+        self.body.append(self.option_list_item_end)
+        
+    def depart_option_list(self, node):
+        if self.option_list_end:
+            self.body.append(self.option_list_end)
+    
+    def visit_option_list_item(self, node):
+        self.body.append(self.option_list_item_start)
+    
+    def depart_option_list_item(self, node):
+        self.body.append(self.option_list_item_end)
+    
+    def visit_description(self, node):
+        self.body.append(self.description_start)
+    
+    def depart_description(self, node):
+        self.body.append(self.description_end)
+    #
+    #
+    ###
+               
+    ###
+    # Links
+    #
+    def create_link(self, id=None, uri=None, name=None, text=None):
+        """Must return Markup text for a link to something.
+        """
+        pass
+
+    def visit_reference(self, node):
+        self.context.append((self.create_link,
+                            node.get('refid'), node.get('refuri'),
+                            node.get('name'), node.astext()))
+        
+    def depart_reference(self, node):
+        self.body.pop()
+        self.body.append(self.context.pop())
+
+    def create_anchor(self, id=None, uri=None, name=None, text=None):
+        """Must return Markup for an anchor."""
+        pass
+    
+    def visit_target(self, node):
+        if node.get('anonymous'):
+            return
+        self.context.append((self.create_anchor,
+                            node.get('refid'), node.get('refuri'),
+                            node.get('name'), node.astext()))        
+    
+    def depart_target(self, node):
+        self.body.extend(self.context)
+        self.context = list()
+    #
+    #
+    ###
+
+    ###
+    # Start Image
+    #
+    def visit_image(self, node):
+        # XXX add more support for scaling
+        if 'uri' in node:
+            self.body.append(self.image(node['uri']))
+            self.body.append('\n\n')
+        raise nodes.SkipNode            
+                
+    def depart_image(self, node):
+        pass
+    #
+    # End Image
+    ###
+
+    ###
+    # Begin footnote
+    #
+    def visit_footnote(self, node):
+        pass
+
+    def depart_footnote(self, node):
+        pass
+
+    def visit_footnote_reference(self, node):
+        self.body.append(self.escape('['))
+        refid = '%s%s' % (self.footnote_prefix, node.astext())
+        self.footnote_refs[node.astext()] = refid
+        self.context.append((self.create_link,
+                            refid, node.get('refuri'),
+                            node.get('name'), node.astext()))        
+
+    def depart_footnote_reference(self, node):
+        self.body.pop()
+        self.body.append(self.context.pop())        
+        self.body.append(self.escape(']'))
+
+    def visit_label(self, node):
+        refid = self.footnote_refs.get(node.astext())
+        self.body.append((self.create_anchor,
+                          refid, node.get('refuri'),
+                          node.get('name'), node.astext()))
+        self.body.append(' ')
+        self.body.append(self.escape('['))
+        
+    def depart_label(self, node):
+        self.body.append(self.escape('] '))
+    #
+    # End footnote
+    ###
+
+    ###
+    # Start Docinfo
+    #
+    def visit_docinfo(self, node):
+        pass
+    
+    def depart_docinfo(self, node):
+        pass
+    
+    def visit_docinfo_item(self, name):
+        self.body.append(self.table_entry_sep)
+        self.body.append(self.strong_start)
+        self.body.append(name)
+        self.body.append(self.strong_end)
+        self.body.append(':')
+        self.body.append(self.table_entry_sep)
+
+    def depart_docinfo_item(self):
+        self.body.append(self.table_entry_sep)
+        self.body.append('\n')
+
+    def visit_version(self, node):
+        self.visit_docinfo_item('Version')
+    
+    def depart_version(self, node):
+        self.depart_docinfo_item()
+    
+    def visit_author(self, node):
+        self.visit_docinfo_item('Author')
+    
+    def depart_author(self, node):
+        self.depart_docinfo_item()
+
+    def visit_authors(self, node):
+        self.visit_docinfo_item('Authors')
+    
+    def depart_authors(self, node):
+        self.depart_docinfo_item()
+        
+    def visit_contact(self, node):
+        self.visit_docinfo_item('Contact')
+
+    def depart_contact(self, node):
+        self.depart_docinfo_item()
+
+    def visit_revision(self, node):
+        self.visit_docinfo_item('Revision')
+
+    def depart_revision(self, node):
+        self.depart_docinfo_item()
+
+    def visit_date(self, node):
+        self.visit_docinfo_item('Date')
+
+    def depart_date(self, node):
+        self.depart_docinfo_item()
+
+    def visit_copyright(self, node):
+        self.visit_docinfo_item('Copyright')
+
+    def depart_copyright(self, node):
+        self.depart_docinfo_item()
+
+    def visit_organization(self, node):
+        self.visit_docinfo_item('Organization')
+
+    def depart_organization(self, node):
+        self.depart_docinfo_item()
+
+    def visit_status(self, node):
+        self.visit_docinfo_item('Status')
+
+    def depart_status(self, node):
+        self.depart_docinfo_item()        
+    #
+    # End Docinfo
+    ###
+
+    ###
+    # Start Admonition
+    #
+    def visit_attention(self, node):
+        self.visit_admonition(node, 'attention')
+
+    def depart_attention(self, node):
+        self.depart_admonition(node, 'attention')
+
+    def visit_caution(self, node):
+        self.visit_admonition(node, 'caution')
+
+    def depart_caution(self, node):
+        self.depart_admonition(node, 'caution')
+
+    def visit_danger(self, node):
+        self.visit_admonition(node, 'danger')
+
+    def depart_danger(self, node):
+        self.depart_admonition(node, 'danger')
+
+    def visit_error(self, node):
+        self.visit_admonition(node, 'error')
+
+    def depart_error(self, node):
+        self.depart_admonition(node, 'error')
+
+    def visit_hint(self, node):
+        self.visit_admonition(node, 'hint')
+
+    def depart_hint(self, node):
+        self.depart_admonition(node, 'hint')
+
+    def visit_important(self, node):
+        self.visit_admonition(node, 'important')
+
+    def depart_important(self, node):
+        self.depart_admonition(node, 'important')
+
+    def visit_note(self, node):
+        self.visit_admonition(node, 'note')
+
+    def depart_note(self, node):
+        self.depart_admonition(node, 'note')
+
+    def visit_tip(self, node):
+        self.visit_admonition(node, 'tip')
+
+    def depart_tip(self, node):
+        self.depart_admonition(node, 'tip')
+
+    def visit_warning(self, node):
+        self.visit_admonition(node, 'warning')
+
+    def depart_warning(self, node):
+        self.depart_admonition(node, 'warning')
+
+    def visit_admonition(self, node, name):
+        if not self.body[-1][-1].isspace():
+            self.body.append('\n')
+            self.body.append('\n')
+        if self.strong_start:
+            self.body.append(self.strong_start)
+        self.body.append(name.title())
+        if self.strong_end:
+            self.body.append(self.strong_end)
+        self.body.append(':')
+        self.body.append('\n')
+        self.body.append('\n')
+
+    def depart_admonition(self, node, name):
+        pass
+    #
+    # End Admonition
+    ###
+
+    
+class TWikiTranslator(WikiTranslator):
+
+    def __init__(self, document):
+        WikiTranslator.__init__(self, document)
+        self._list_tag_indent = 3
+        self._literal_block_indent = 0
+        self.emphasis_start = '_'
+        self.emphasis_end = '_'
+        self.strong_start = '*'
+        self.strong_end = '*'
+        # Inline literal's *must* begin and end with a space
+        self.literal_start = ' ='
+        self.literal_end = '= '
+        self.title_reference_start = '_'
+        self.title_reference_end = '_'
+        self.literal_block_start = '&amp;lt;verbatim&amp;gt;'
+        self.literal_block_end = '&amp;lt;/verbatim&amp;gt;'
+        self.table_header_sep = '|'
+        self.table_entry_sep = '|'
+        self.toc = '%TOC%'
+        self.block_quote_start = '&amp;lt;literal&amp;gt;&amp;lt;blockquote&amp;gt;'
+        self.block_quote_end = '&amp;lt;/blockquote&amp;gt;&amp;lt;/literal&amp;gt;'
+        self.definition_term_start = '   $ '
+        self.definition_term_end = ': '
+        self.section_anchors = list()          # Track section anchors we have seen
+        self.footnote_prefix = 'FootNote'
+        self.option_list_start = '&amp;lt;table border="1"&amp;gt;&amp;lt;col width="20%"/&amp;gt;&amp;lt;col width="80%"/&amp;gt;'
+        self.option_list_end = '&amp;lt;/table&amp;gt;'
+        self.option_list_item_start = '&amp;lt;tr&amp;gt;'
+        self.option_list_item_end = '&amp;lt;/tr&amp;gt;'
+        self.option_group_start = '&amp;lt;td&amp;gt; '
+        self.option_group_end = ' &amp;lt;/td&amp;gt;'
+        self.description_start = '&amp;lt;td&amp;gt; '
+        self.description_end = ' &amp;lt;/td&amp;gt;'
+        
+        
+    def escape(self, text):
+        if self.in_table:
+            text = text.replace('\n', ' \\\n')
+        if not self.in_literal_block:
+            text = text.replace('&amp;lt;', '&amp;amp;lt;')
+            text = text.replace('&amp;gt;', '&amp;amp;gt;')
+        return text
+    
+    def title_prefix(self):
+        return '---%s ' % ('+' * self.section_level)
+
+    def title_anchor(self, title):
+        count = 0
+        prefix = '_'.join(title.strip('()?:').split())
+        while True:
+            if count:
+                anchor = '%s_AN%d' % (prefix, count)
+            else:
+                anchor = prefix
+            if anchor not in self.section_anchors:
+                break
+            count += 1
+        self.section_anchors.append(anchor)
+        return anchor
+
+    def list_indent(self):
+        if self.list_level:
+            return (' ' * ((self.list_level * self._list_tag_indent)+1)) + ' '
+        return ''
+    
+    def list_prefix(self, type):
+        if self.in_table:
+            return '&amp;lt;li&amp;gt;'
+        depth = self.list_level
+        if self.in_definition_list:
+            depth -= 1
+        if type == 'bullet':
+            return '%s* ' % (' ' * (depth * self._list_tag_indent))
+        if type == 'enumerated':
+            return '%s1. ' % (' ' * (depth * self._list_tag_indent))
+
+    ###
+    # TWiki doesn't support lists in using Wiki syntax within
+    # a table, so the logic below moves to HTML when in side
+    # a table.
+    #
+    def depart_list_item(self, node):
+        WikiTranslator.depart_list_item(self, node)
+        if self.in_table:
+            self.body.pop()             # remove endline
+            self.body.append('&amp;lt;/li&amp;gt;')
+
+    def visit_bullet_list(self, node):
+        WikiTranslator.visit_bullet_list(self, node)
+        if self.in_table:
+            self.body.append('&amp;lt;ul&amp;gt;')
+
+    def depart_bullet_list(self, node):
+        WikiTranslator.depart_bullet_list(self, node)
+        if self.in_table:
+            self.body.append('&amp;lt;/ul&amp;gt;')
+            # Null gets popped off the stack on table entry departure
+            self.body.append('')        
+        
+    def visit_enumerated_list(self, node):
+        WikiTranslator.visit_enumerated_list(self, node)
+        if self.in_table:
+            self.body.append('&amp;lt;ol&amp;gt;')
+        
+    def depart_enumerated_list(self, node):
+        WikiTranslator.depart_enumerated_list(self, node)
+        if self.in_table:
+            self.body.append('&amp;lt;/ol&amp;gt;')
+            # Null gets popped off the stack on table entry departure
+            self.body.append('')        
+    #
+    # End section
+    ###
+
+    ###
+    # TWiki requires some extra strong emphasis for table headers
+    #
+    def visit_entry(self, node):
+        WikiTranslator.visit_entry(self, node)
+        if self.in_table_header:
+            self.body.append(self.strong_start)
+        
+    def depart_entry(self, node):
+        WikiTranslator.depart_entry(self, node)
+        if self.in_table_header:
+            self.body.append(self.strong_end)
+    #
+    # End section
+    ###
+
+    ###
+    # Links
+    #
+    def create_link(self, id=None, uri=None, name=None, text=None):
+        if not name:
+            name = text
+        if id:
+            # Sections have special anchors
+            if id in self.section_refs:
+                id = self.section_refs[id]
+            if name:
+                return '[[#%s][%s]]' % (id, name)
+            else:
+                return '[[#%s]]' % id
+        if uri:
+            if 'mail' in uri:
+                return '[[%s][%s]]' % (uri, name)
+            elif name:
+                return '[[%s][%s]]' % (uri, name)
+            else:
+                return '[[%s]]' % uri
+
+    def create_anchor(self, id=None, uri=None, name=None, text=None):
+        if id:
+            return '#%s' % id
+        if uri:
+            return '[[%s]]' % uri
+    #
+    # End Links
+    ###
+
+    def image(self, uri):
+        return os.path.normpath('%ATTACHURL%/' + uri)
+    
+class ConfluenceTranslator(WikiTranslator):
+
+    def __init__(self, document):
+        WikiTranslator.__init__(self, document)
+        self.emphasis_start = '_'
+        self.emphasis_end = '_'
+        self.strong_start = '*'
+        self.strong_end = '*'
+        self.literal_start = '{{'
+        self.literal_end = '}}'
+        self.title_reference_start = '_'
+        self.title_reference_end = '_'
+        self.literal_block_start = '{noformat}'
+        self.literal_block_end = '{noformat}'
+        self.table_header_sep = '||'
+        self.table_entry_sep = '|'
+        self.toc = '{toc}'
+        self.block_quote_start = '{quote}'
+        self.block_quote_end = '{quote}'
+        self.definition_start = '{quote}'
+        self.definition_end = '{quote}'
+        self.definition_term_start = None
+        self.definition_term_end = None
+        self.anchor_start = '[#'
+        self.anchor_end = ']'
+        self.link_start = None
+        self.link_end = None
+        self.link_name_start = None
+        self.link_name_end = None
+        self.footnote_prefix = 'foot-note-'
+        self.option_list_start = None
+        self.option_list_end = None
+        self.option_list_item_start = '{section:border=true}'
+        self.option_list_item_end = '{section}'
+        self.option_group_start = '{column:width=20%}'
+        self.option_group_end = '{column}'
+        self.description_start = '{column:width=80%}'
+        self.description_end = '{column}'
+        self.section_anchors = list()          # Track section anchors we have seen
+        
+    def escape(self, text):
+        if not (self.in_literal or self.in_literal_block):
+            text = text.replace('[', '\[')
+            text = text.replace(']', '\]')
+            text = text.replace('{', '\{')
+            text = text.replace('}', '\}')
+            text = text.replace(':', '&amp;amp;#58;')
+        if self.in_literal:
+            text = text.replace('*', '\*')
+            text = text.replace(r'\\*', '\*') # incase we already escaped
+        if not self.in_literal_block:
+            text = text.replace('-', '\-')
+            text = text.replace('!', '\!')
+        return text
+    
+    def title_prefix(self):
+        return 'h%s. ' % self.section_level
+
+    def title_anchor(self, title):
+        count = 0
+        anchor = ''.join(title.split())
+        anchor = anchor.strip('_')
+        anchor = anchor.replace(':', '&amp;amp;#58;')
+        return anchor
+    
+    def list_prefix(self, type):
+        depth = self.list_level
+        if self.in_definition_list:
+            depth -= 1
+        if type == 'bullet':
+            return '%s ' % ('*' * depth)
+        elif type == 'enumerated':
+            return '%s ' % ('#' * depth)
+
+    def create_link(self, id=None, uri=None, name=None, text=None):
+        if not name:
+            name = text
+        if id:
+            # Sections have special anchors
+            if id in self.section_refs:
+                id = self.section_refs[id]            
+            if name:
+                return '[%s|#%s]' % (name, id)
+            else:
+                return '[#%s]' % id
+        if uri:
+            if 'mail' in uri:
+                return '[%s|%s]' % (name, uri)
+            elif name:
+                return '[%s|%s]' % (name, uri)
+            else:
+                return '[%s]' % uri        
+        if id: # XXX Why?
+            if text:
+                return '[%s|#%s]' % (text, id)
+            else:
+                return '[#%s]' % id 
+
+    def create_anchor(self, id=None, uri=None, name=None, text=None):
+        if id:
+            return '{anchor:%s}' % id
+        if uri:
+            return '[%s]' % uri
+        
+    def image(self, uri):
+        return '!%s!' % uri
+
+    def visit_admonition(self, node, name):        
+        if name in ['note', 'important', 'attention']:
+            self.body.append('{note:title=%s}' % name.title())
+        elif name in ['warning', 'caution', 'danger', 'error']:
+            self.body.append('{warning:title=%s}' % name.title())
+        elif name in ['info']:
+            self.body.append('{info:title=%s}' % name.title())
+        elif name in ['tip', 'hint']:
+            self.body.append('{tip:title=%s}' % name.title())            
+
+    def depart_admonition(self, node, name):        
+        if name in ['note', 'important', 'attention']:
+            self.body.append('{note}')
+        elif name in ['warning', 'caution', 'danger', 'error']:
+            self.body.append('{warning}')
+        elif name in ['info']:
+            self.body.append('{info}')
+        elif name in ['tip', 'hint']:
+            self.body.append('{tip}')

Added: trunk/sandbox/rst2wiki/tools/rst2wiki.py
===================================================================
--- trunk/sandbox/rst2wiki/tools/rst2wiki.py                        (rev 0)
+++ trunk/sandbox/rst2wiki/tools/rst2wiki.py2012-05-12 04:35:29 UTC (rev 7435)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,37 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#!/usr/bin/python
+
+# Copyright (c) 2012, Joshua Graff
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+#     1. Redistributions of source code must retain the above copyright notice, this
+#        list of conditions and the following disclaimer.
+#     2. Redistributions in binary form must reproduce the above copyright notice,
+#        this list of conditions and the following disclaimer in the documentation
+#        and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+#  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import locale
+try:
+    locale.setlocale(locale.LC_ALL, '')
+except:
+    pass
+
+from docutils.core import publish_cmdline, default_description
+from docutils.writers import wiki
+
+description = ("Generates Wiki documents.  " + default_description)
+
+publish_cmdline(writer=wiki.Writer(), description=description)


Property changes on: trunk/sandbox/rst2wiki/tools/rst2wiki.py
___________________________________________________________________
Added: svn:executable
   + *

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>joshuagraff&lt; at &gt;users.sourceforge.net</dc:creator>
    <dc:date>2012-05-12T04:35:30</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.cvs/7709">
    <title>SF.net SVN: docutils:[7434] trunk/docutils/docutils/writers/html4css1/ html4css1.css</title>
    <link>http://comments.gmane.org/gmane.text.docutils.cvs/7709</link>
    <description>&lt;pre&gt;Revision: 7434
          http://docutils.svn.sourceforge.net/docutils/?rev=7434&amp;amp;view=rev
Author:   milde
Date:     2012-05-11 21:06:27 +0000 (Fri, 11 May 2012)
Log Message:
-----------
Basic CSS rules for (source)code (margin, background, linenumbers).

Modified Paths:
--------------
    trunk/docutils/docutils/writers/html4css1/html4css1.css

Modified: trunk/docutils/docutils/writers/html4css1/html4css1.css
===================================================================
--- trunk/docutils/docutils/writers/html4css1/html4css1.css2012-05-11 21:03:07 UTC (rev 7433)
+++ trunk/docutils/docutils/writers/html4css1/html4css1.css2012-05-11 21:06:27 UTC (rev 7434)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -240,10 +240,18 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
   margin-top: 0 ;
   font: inherit }
 
-pre.literal-block, pre.doctest-block, pre.math {
+pre.literal-block, pre.doctest-block, pre.math, pre.code {
   margin-left: 2em ;
   margin-right: 2em }
 
+pre.code .ln { /* line numbers */
+  color: grey;
+}
+
+.code {
+  background-color: #eeeeee
+}
+
 span.classifier {
   font-family: sans-serif ;
   font-style: oblique }

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>milde&lt; at &gt;users.sourceforge.net</dc:creator>
    <dc:date>2012-05-11T21:06:27</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.cvs/7708">
    <title>SF.net SVN: docutils:[7433] trunk/docutils</title>
    <link>http://comments.gmane.org/gmane.text.docutils.cvs/7708</link>
    <description>&lt;pre&gt;Revision: 7433
          http://docutils.svn.sourceforge.net/docutils/?rev=7433&amp;amp;view=rev
Author:   milde
Date:     2012-05-11 21:03:07 +0000 (Fri, 11 May 2012)
Log Message:
-----------
Fix [ 3525847 ] UnicodeEncodeError with locale == C 
and 8-bit char in path argument of `include` directive.

Modified Paths:
--------------
    trunk/docutils/HISTORY.txt
    trunk/docutils/docutils/parsers/rst/directives/misc.py
    trunk/docutils/test/alltests.py
    trunk/docutils/test/test_parsers/test_rst/test_directives/test_include.py

Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt2012-05-09 15:16:51 UTC (rev 7432)
+++ trunk/docutils/HISTORY.txt2012-05-11 21:03:07 UTC (rev 7433)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -16,7 +16,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 Changes Since 0.9
 =================
 
+* docutils/parsers/rst/directives/misc.py
 
+  - Fix [ 3525847 ] UnicodeEncodeError with locale == C and 8-bit char
+    in path argument of `include` directive.
+
 Release 0.9 (2012-05-02)
 ========================
 

Modified: trunk/docutils/docutils/parsers/rst/directives/misc.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/directives/misc.py2012-05-09 15:16:51 UTC (rev 7432)
+++ trunk/docutils/docutils/parsers/rst/directives/misc.py2012-05-11 21:03:07 UTC (rev 7433)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -73,6 +73,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
                 error_handler=(self.state.document.settings.\
                                input_encoding_error_handler),
                 handle_io_errors=None)
+        except UnicodeEncodeError, error:
+            raise self.severe(u'Problems with "%s" directive path:\n'
+                              'Cannot encode input file path "%s" '
+                              '(wrong locale?).' %
+                              (self.name, SafeString(path)))
         except IOError, error:
             raise self.severe(u'Problems with "%s" directive path:\n%s.' %
                       (self.name, ErrorString(error)))

Modified: trunk/docutils/test/alltests.py
===================================================================
--- trunk/docutils/test/alltests.py2012-05-09 15:16:51 UTC (rev 7432)
+++ trunk/docutils/test/alltests.py2012-05-11 21:03:07 UTC (rev 7433)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -33,8 +33,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
         self.encoding = getattr(stream, 'encoding', None)
 
     def write(self, string):
-        self.stream.write(string)
-        self.file.write(string)
+        try:
+            self.stream.write(string)
+            self.file.write(string)
+        except UnicodeEncodeError:   # Py3k writing to "ascii" stream/file
+            string = string.encode('raw_unicode_escape').decode('ascii')
+            self.stream.write(string)
+            self.file.write(string)
 
     def flush(self):
         self.stream.flush()

Modified: trunk/docutils/test/test_parsers/test_rst/test_directives/test_include.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_directives/test_include.py2012-05-09 15:16:51 UTC (rev 7432)
+++ trunk/docutils/test/test_parsers/test_rst/test_directives/test_include.py2012-05-11 21:03:07 UTC (rev 7433)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -50,6 +50,18 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 nonexistent_rel = DocutilsTestSupport.utils.relative_path(
     os.path.join(DocutilsTestSupport.testroot, 'dummy'), nonexistent)
 
+# Different error for path with 8bit chars with locale == C or None:
+try:
+    open(u'\u043c\u0438\u0440.txt')
+except UnicodeEncodeError:
+    errstr_8bit_path = u"""\
+Cannot encode input file path "\u043c\u0438\u0440.txt" (wrong locale?).\
+"""
+except:
+    errstr_8bit_path = u"""\
+InputError: [Errno 2] No such file or directory: '\u043c\u0438\u0440.txt'.\
+"""
+
 totest = {}
 
 totest['include'] = [
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -414,10 +426,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     &amp;lt;system_message level="4" line="3" source="test data" type="SEVERE"&amp;gt;
         &amp;lt;paragraph&amp;gt;
             Problems with "include" directive path:
-            InputError: [Errno 2] No such file or directory: '\u043c\u0438\u0440.txt'.
+            %s
         &amp;lt;literal_block xml:space="preserve"&amp;gt;
             .. include:: \u043c\u0438\u0440.txt
-"""],
+""" % errstr_8bit_path],
 ["""\
 Testing errors in included file:
 

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>milde&lt; at &gt;users.sourceforge.net</dc:creator>
    <dc:date>2012-05-11T21:03:07</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.cvs/7707">
    <title>SF.net SVN: docutils:[7432]trunk/sandbox/code-block-directive/tools/</title>
    <link>http://comments.gmane.org/gmane.text.docutils.cvs/7707</link>
    <description>&lt;pre&gt;Revision: 7432
          http://docutils.svn.sourceforge.net/docutils/?rev=7432&amp;amp;view=rev
Author:   milde
Date:     2012-05-09 15:16:51 +0000 (Wed, 09 May 2012)
Log Message:
-----------
Cleanup code-block-directive sandbox project, part 3.

Removed Paths:
-------------
    trunk/sandbox/code-block-directive/tools/

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>milde&lt; at &gt;users.sourceforge.net</dc:creator>
    <dc:date>2012-05-09T15:16:52</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.cvs/7706">
    <title>SF.net SVN: docutils:[7431]trunk/sandbox/stylesheets</title>
    <link>http://comments.gmane.org/gmane.text.docutils.cvs/7706</link>
    <description>&lt;pre&gt;Revision: 7431
          http://docutils.svn.sourceforge.net/docutils/?rev=7431&amp;amp;view=rev
Author:   milde
Date:     2012-05-09 14:07:41 +0000 (Wed, 09 May 2012)
Log Message:
-----------
Stylesheets update.

Modified Paths:
--------------
    trunk/sandbox/stylesheets/bold-definition-terms.css
    trunk/sandbox/stylesheets/index.txt

Added Paths:
-----------
    trunk/sandbox/stylesheets/pygments_css2sty.py

Modified: trunk/sandbox/stylesheets/bold-definition-terms.css
===================================================================
--- trunk/sandbox/stylesheets/bold-definition-terms.css2012-05-09 13:42:58 UTC (rev 7430)
+++ trunk/sandbox/stylesheets/bold-definition-terms.css2012-05-09 14:07:41 UTC (rev 7431)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,22 +1,27 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
-/* transiton-stars.css: Style a Docutils transition */
+/* Bold definition list terms */
+/* ************************** */
+
 /* :Author:    Günter Milde */
 /* :Copyright: © 2008 Günter Milde. */
-/*             Released  without warranties or conditions of any kind */
-/*             under the terms of the Apache License, Version 2.0 */
-/*        http://www.apache.org/licenses/LICENSE-2.0 */
+/* :License: Released under the terms of the `2-Clause BSD license`_, in short: */
+/*        */
+/*    Copying and distribution of this file, with or without modification,      */
+/*    are permitted in any medium without royalty provided the copyright        */
+/*    notice and this notice are preserved.        */
+/*    This file is offered as-is, without any warranty.        */
+/*        */
+/* .. _2-Clause BSD license: http://www.spdx.org/licenses/BSD-2-Clause        */
+
 /* :Id: $Id$ */
 
 /* Style sheet for use with Docutils */
-
-/* You can use this style as a template for customising  the transition */
-/* element. */
-
 /* Extends the standard docutils style sheet */
 
 /* Instead of modifying html4css1.css, you can convert your sources with: */
 /*   rst2html --stylesheet=/html4css1.css,/bold-definition-terms.css INFILE */
 /* to get bold face definition terms. */
 
-dl.docutils dt {
-  font-weight: bold }
-*/
+/* :: */
+
+dl.docutils dt { font-weight: bold; }
+

Modified: trunk/sandbox/stylesheets/index.txt
===================================================================
--- trunk/sandbox/stylesheets/index.txt2012-05-09 13:42:58 UTC (rev 7430)
+++ trunk/sandbox/stylesheets/index.txt2012-05-09 14:07:41 UTC (rev 7431)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -73,6 +73,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 * `&amp;lt;pygments-default.sty&amp;gt;`_, `&amp;lt;pygments-long.sty&amp;gt;`_:
   Examples/templates for syntax highlight of code_ snippets.
 
+Tools
+=====
+
+* `&amp;lt;pygments_css2sty.py&amp;gt;`_:
+  Convert a CSS stylesheet for syntax highlight in a HTML document
+  into one for Docutils' LaTeX output.
+
 .. References
    ==========
 

Copied: trunk/sandbox/stylesheets/pygments_css2sty.py (from rev 7428, trunk/sandbox/code-block-directive/tools/makesty.py)
===================================================================
--- trunk/sandbox/stylesheets/pygments_css2sty.py                        (rev 0)
+++ trunk/sandbox/stylesheets/pygments_css2sty.py2012-05-09 14:07:41 UTC (rev 7431)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,63 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#! /usr/bin/env python
+# coding: utf8
+# Copyright: Raphael 'kena' Poss &amp;lt;r.c.poss&amp;lt; at &amp;gt;uva.nl&amp;gt;
+# this file is placed in the public domain.
+#
+# Convert a CSS stylesheet into one for Docutils' LaTeX output.
+#
+# Usage example::
+#
+#    pygmentize -S default -f html | pygments_css2sty.py &amp;gt;pygments-default.sty
+#
+# Versions:
+#
+# 2012-05-09: Günter Milde &amp;lt;milde&amp;lt; at &amp;gt;users.sf.net&amp;gt;:
+#             Bugfix: do not fail at lines without comment.
+#             Support for digits in role names.
+#             ``\providecommand`` instead of ``\newcommand``.
+#             Renamed from makesty.py to pygments_css2sty.py.
+
+import sys
+import re
+
+print '% Stylesheet for syntax highlight with Docutils'
+print '% Generated by pygments_css2sty.py from a Pygments CSS style'
+print '% (output of `pygmentize -S &amp;lt;style&amp;gt; -f html`).'
+print
+print r'\RequirePackage{color}'
+
+cnt = 0
+for l in sys.stdin:
+
+    if '/*' in l:
+        print "% " + l.split('*')[1]
+    key = l.split(' ', 1)[0][1:]
+
+    s = '#1'
+
+    if 'color:' in l:
+        col = l.split('#',1)[1][:6]
+        r = float(int(col[0:2], 16)) / 255.
+        g = float(int(col[2:4], 16)) / 255.
+        b = float(int(col[4:6], 16)) / 255.
+        s = r'\textcolor[rgb]{%.2f,%.2f,%.2f}{%s}' % (r, g, b, s)
+
+    if 'font-style: italic' in l:
+        s = r'\textit{%s}' % s
+    if 'font-weight: bold' in l:
+        s = r'\textbf{%s}' % s
+
+    if 'border:' in l:
+        col = l.split('#',1)[1][:6]
+        r = float(int(col[0:2], 16)) / 255.
+        g = float(int(col[2:4], 16)) / 255.
+        b = float(int(col[4:6], 16)) / 255.
+        cname = 'DUcolor%d' % cnt
+        cnt += 1
+        print r'\definecolor{%s}{rgb}{%.2f,%.2f,%.2f}' % (cname, r, g, b)
+        s = r'\colorbox{%s}{%s}' % (cname, s)
+
+    if re.match(r'.*[0-9]', key) is None:
+        print r'\providecommand*\DUrole%s[1]{%s}' % (key, s)
+    else:
+        print r'\providecommand\csname DUrole%s\endcsname[1]{%s}' % (key, s)

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Docutils-checkins mailing list
Docutils-checkins&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-checkins
&lt;/pre&gt;</description>
    <dc:creator>milde&lt; at &gt;users.sourceforge.net</dc:creator>
    <dc:date>2012-05-09T14:07:41</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.cvs/7705">
    <title>SF.net SVN: docutils:[7430]trunk/sandbox/code-block-directive</title>
    <link>http://comments.gmane.org/gmane.text.docutils.cvs/7705</link>
    <description>&lt;pre&gt;Revision: 7430
          http://docutils.svn.sourceforge.net/docutils/?rev=7430&amp;amp;view=rev
Author:   milde
Date:     2012-05-09 13:42:58 +0000 (Wed, 09 May 2012)
Log Message:
-----------
Clean up code-block-directive sandbox project.

Modified Paths:
--------------
    trunk/sandbox/code-block-directive/README.txt
    trunk/sandbox/code-block-directive/docs/myfunction.py.pdf
    trunk/sandbox/code-block-directive/docs/myfunction.py.pseudoxml
    trunk/sandbox/code-block-directive/docs/myfunction.py.tex
    trunk/sandbox/code-block-directive/docs/myfunction.py.txt
    trunk/sandbox/code-block-directive/docs/syntax-highlight.txt

Removed Paths:
-------------
    trunk/sandbox/code-block-directive/data/
    trunk/sandbox/code-block-directive/pygments_code_block_directive.py
    trunk/sandbox/code-block-directive/rst2html-highlight.py
    trunk/sandbox/code-block-directive/rst2latex-highlight.py
    trunk/sandbox/code-block-directive/tools/makesty.py
    trunk/sandbox/code-block-directive/tools/pygments-docutilsroles.sty
    trunk/sandbox/code-block-directive/tools/pygments-enhanced-front-ends/
    trunk/sandbox/code-block-directive/tools/test_pygments_code_block_directive.py

Modified: trunk/sandbox/code-block-directive/README.txt
===================================================================
--- trunk/sandbox/code-block-directive/README.txt2012-05-09 10:41:38 UTC (rev 7429)
+++ trunk/sandbox/code-block-directive/README.txt2012-05-09 13:42:58 UTC (rev 7430)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -7,42 +7,20 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 :Author: Günter Milde
 :Contact: milde&amp;lt; at &amp;gt;users.berlios.de
 :Date: $Date$
-:Copyright: © 2007, 2009 G. Milde,
-            Released  without warranties or conditions of any kind
-            under the terms of the Apache License, Version 2.0
-            http://www.apache.org/licenses/LICENSE-2.0
 
-This sandbox project contains experimental code and documentation related to
-the proposal for syntax highlight of source code in docutils using a
-"code-block" directive.
+This sandbox project contained experimental code and documentation related to
+the proposal for syntax highlight of source code in Docutils.
 
-See `&amp;lt;docs/syntax-highlight.html&amp;gt;`_ for a full description.
+Since version 0.9, Docutils supports this via the `code` directive and role
+and the `code` option of the `include` directive. Most of this project is
+moved to the attic.
 
-`&amp;lt;rst2html-highlight&amp;gt;`_
-   front end for reStructuredText -&amp;gt; HTML conversion supporting the
-   "code-block" directive.
+The documentation in `&amp;lt;docs/syntax-highlight.html&amp;gt;`_ is kept as it
+contains ideas for further improvement.
 
-`&amp;lt;rst2latex-highlight&amp;gt;`_
-   front end for reStructuredText -&amp;gt; LaTeX conversion supporting the
-   "code-block" directive.
+Sample stylesheets are now available in the `&amp;lt;../stylesheets&amp;gt;`_ repository.
 
-`&amp;lt;data&amp;gt;`_
-   Style sheets.
 
-`&amp;lt;docs&amp;gt;`_
-   Documentation, concepts, discussion, examples...
-
-`&amp;lt;pygments_code_block_directive.py&amp;gt;`_
-   Working example: defines and registers a
-   code-block directive using the Pygments_  syntax highlighter.
-
-`&amp;lt;tools/test_pygments_code_block_directive.py&amp;gt;`_
-   Script for interactive testing.
-
-`&amp;lt;tools/pygments-enhanced-front-ends/&amp;gt;`_
-   Legacy front ends,
-
-
 .. References
 
 .. _pygments: http://pygments.org/

Modified: trunk/sandbox/code-block-directive/docs/myfunction.py.pdf
===================================================================
(Binary files differ)

Modified: trunk/sandbox/code-block-directive/docs/myfunction.py.pseudoxml
===================================================================
--- trunk/sandbox/code-block-directive/docs/myfunction.py.pseudoxml2012-05-09 10:41:38 UTC (rev 7429)
+++ trunk/sandbox/code-block-directive/docs/myfunction.py.pseudoxml2012-05-09 13:42:58 UTC (rev 7430)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2,22 +2,91 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     &amp;lt;paragraph&amp;gt;
         This is a test of the new "code" directive:
     &amp;lt;comment xml:space="preserve"&amp;gt;
-        Translate this document to HTML with a pygments enhanced frontend, e.g.
+        Translate this document with a pygments enhanced frontend, e.g.
         
-        ../rst2html-highlight.py --stylesheet=../data/pygments-default.css
+         ../rst2html-highlight.py --stylesheet=../data/pygments-default.css
+         ../rst2latex-highlight.py --stylesheet=../data/pygments-docutilsroles.sty
         
-        ../rst2latex-highlight.py --stylesheet=../data/pygments-docutilsroles.sty
+        or via the test case in
         
-        ../rst2pseudoxml-highlight.py
+         ../pygments_code_block_directive.py --traceback
     &amp;lt;paragraph&amp;gt;
         The example from Docutils TODO list:
-    &amp;lt;literal_block classes="code pythonsi" xml:space="preserve"&amp;gt;
-        print 'This is Python code.'
-           for i in range(10):
-               print i
+    &amp;lt;literal_block classes="code python" xml:space="preserve"&amp;gt;
+        &amp;lt;inline classes="k"&amp;gt;
+            print
+         
+        &amp;lt;inline classes="s"&amp;gt;
+            'This is Python code.'
+        
+        &amp;lt;inline classes="k"&amp;gt;
+            for
+         
+        &amp;lt;inline classes="n"&amp;gt;
+            i
+         
+        &amp;lt;inline classes="ow"&amp;gt;
+            in
+         
+        &amp;lt;inline classes="nb"&amp;gt;
+            range
+        &amp;lt;inline classes="p"&amp;gt;
+            (
+        &amp;lt;inline classes="mi"&amp;gt;
+            10
+        &amp;lt;inline classes="p"&amp;gt;
+            ):
+        
+            
+        &amp;lt;inline classes="k"&amp;gt;
+            print
+         
+        &amp;lt;inline classes="n"&amp;gt;
+            i
     &amp;lt;paragraph&amp;gt;
+        Numbered lines:
+    &amp;lt;literal_block classes="code python" xml:space="preserve"&amp;gt;
+        &amp;lt;inline classes="ln"&amp;gt;
+            1 
+        &amp;lt;inline classes="c"&amp;gt;
+            # This is Python code,
+        
+        &amp;lt;inline classes="ln"&amp;gt;
+            2 
+        &amp;lt;inline classes="c"&amp;gt;
+            # that prints the integers from 0 to 9
+        
+        &amp;lt;inline classes="ln"&amp;gt;
+            3 
+        &amp;lt;inline classes="k"&amp;gt;
+            for
+         
+        &amp;lt;inline classes="n"&amp;gt;
+            i
+         
+        &amp;lt;inline classes="ow"&amp;gt;
+            in
+         
+        &amp;lt;inline classes="nb"&amp;gt;
+            range
+        &amp;lt;inline classes="p"&amp;gt;
+            (
+        &amp;lt;inline classes="mi"&amp;gt;
+            10
+        &amp;lt;inline classes="p"&amp;gt;
+            ):
+        
+        &amp;lt;inline classes="ln"&amp;gt;
+            4 
+            
+        &amp;lt;inline classes="k"&amp;gt;
+            print
+         
+        &amp;lt;inline classes="n"&amp;gt;
+            i
+    &amp;lt;paragraph&amp;gt;
         Another example:
-    &amp;lt;literal_block classes="code python silly" ids="my-function" names="my-function" xml:space="preserve"&amp;gt;
+    &amp;lt;literal_block classes="code python silly" ids="my-function" names="my_function" xml:space="preserve"&amp;gt;
         &amp;lt;inline classes="ln"&amp;gt;
              7 
         &amp;lt;inline classes="k"&amp;gt;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -36,23 +105,19 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
         &amp;lt;inline classes="ln"&amp;gt;
              9 
         &amp;lt;inline classes="sd"&amp;gt;
-            
+                """
+        
         &amp;lt;inline classes="ln"&amp;gt;
             10 
-        &amp;lt;inline classes="sd"&amp;gt;
-                just a test"""
         
         &amp;lt;inline classes="ln"&amp;gt;
             11 
-        
-        &amp;lt;inline classes="ln"&amp;gt;
-            12 
             
         &amp;lt;inline classes="c"&amp;gt;
             # and now for something completely different
         
         &amp;lt;inline classes="ln"&amp;gt;
-            13 
+            12 
             
         &amp;lt;inline classes="k"&amp;gt;
             print

Modified: trunk/sandbox/code-block-directive/docs/myfunction.py.tex
===================================================================
--- trunk/sandbox/code-block-directive/docs/myfunction.py.tex2012-05-09 10:41:38 UTC (rev 7429)
+++ trunk/sandbox/code-block-directive/docs/myfunction.py.tex2012-05-09 13:42:58 UTC (rev 7430)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -14,8 +14,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 \setlength{\DUlineblockindent}{1em}
 
 %%% User specified packages and stylesheets
+\usepackage{palatino-optima-txtt}
+\usepackage{microtype}
+\usepackage{bookmark}
+
 \usepackage{../data/pygments-docutilsroles}
-
 %%% Fallback definitions for Docutils-specific commands
 
 % inline markup (custom roles)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -65,7 +68,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 Numbered lines:
 %
 \begin{quote}{\ttfamily \raggedright \noindent
-\DUrole{ln}{1~}\DUrole{c}{\#~This~is~Python~code,}~\\
+\DUrole{l}{\DUrole{n}{1~}}\DUrole{c}{\#~This~is~Python~code,}~\\
 \DUrole{ln}{2~}\DUrole{c}{\#~that~prints~the~integers~from~0~to~9}~\\
 \DUrole{ln}{3~}\DUrole{k}{for}~\DUrole{n}{i}~\DUrole{ow}{in}~\DUrole{nb}{range}\DUrole{p}{(}\DUrole{mi}{10}\DUrole{p}{):}~\\
 \DUrole{ln}{4~}~~~~\DUrole{k}{print}~\DUrole{n}{i}
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -75,7 +78,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 Another example:
 %
 \begin{quote}{\ttfamily \raggedright \noindent
-\DUrole{ln}{~7~}\DUrole{k}{def}~\DUrole{nf}{my\_function}\DUrole{p}{():}~\\
+\DUrole{l}{\DUrole{n}{~7~}}\DUrole{k}{def}~\DUrole{nf}{my\_function}\DUrole{p}{():}~\\
 \DUrole{ln}{~8~}~~~~\DUrole{sd}{"{}"{}"Test~the~lexer.\\
 }\DUrole{ln}{~9~}\DUrole{sd}{~~~~"{}"{}"}~\\
 \DUrole{ln}{10~}~\\
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -84,6 +87,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 }
 \end{quote}
 
-The end.
+Inline code \texttt{\DUrole{code}{\$\textbackslash{}alpha =
+\textbackslash{}int\_0\textasciicircum{}\textbackslash{}infty f(x) dx\$}}.
 
+Python code \texttt{\DUrole{code}{\DUrole{python}{\DUrole{testclass}{\DUrole{k}{print}\DUrole{p}{(}\DUrole{s}{"The end."}\DUrole{p}{)}}}}}
+
 \end{document}

Modified: trunk/sandbox/code-block-directive/docs/myfunction.py.txt
===================================================================
--- trunk/sandbox/code-block-directive/docs/myfunction.py.txt2012-05-09 10:41:38 UTC (rev 7429)
+++ trunk/sandbox/code-block-directive/docs/myfunction.py.txt2012-05-09 13:42:58 UTC (rev 7430)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -42,4 +42,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
       # and now for something completely different
       print 8/2
 
-The end.
+Inline code :code:`$\alpha = \int_0^\infty f(x) dx$`.
+
+.. role:: python(code)
+   :language: python
+   :class: testclass
+
+Python code :python:`print("The end.")`

Modified: trunk/sandbox/code-block-directive/docs/syntax-highlight.txt
===================================================================
--- trunk/sandbox/code-block-directive/docs/syntax-highlight.txt2012-05-09 10:41:38 UTC (rev 7429)
+++ trunk/sandbox/code-block-directive/docs/syntax-highlight.txt2012-05-09 13:42:58 UTC (rev 7430)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -6,170 +6,27 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 :Author:    Günter Milde
 :Contact:   milde&amp;lt; at &amp;gt;users.berlios.de
 :Date:      $Date$
-:Copyright: © 2007, 2009 G. Milde,
-            Released  without warranties or conditions of any kind
-            under the terms of the Apache License, Version 2.0
-            http://www.apache.org/licenses/LICENSE-2.0
+:Copyright: © 2007, 2009, 2012 G. Milde,
+:License: Released under the terms of the `2-Clause BSD license`_, in short:
+
+   Copying and distribution of this file, with or without modification,
+   are permitted in any medium without royalty provided the copyright
+   notice and this notice are preserved.
+   This file is offered as-is, without any warranty.
+
+.. _2-Clause BSD license: http://www.spdx.org/licenses/BSD-2-Clause
+
 :Abstract:  Proposal to add syntax highlight of code blocks to the
             capabilities of Docutils_.
 
 .. sectnum::
 .. contents::
 
-Syntax highlighting significantly enhances the readability of code. However,
-in the current version, docutils does not highlight literal blocks.
+Syntax highlighting significantly enhances the readability of code.
+Since version 0.9, docutils supports this with a `code` directive and role
+as well as a `code` option to the `include` directive using the Pygments_
+syntax highlighter.
 
-This sandbox project aims to add syntax highlight of code blocks to the
-capabilities of docutils. To find its way into the docutils core, it should
-meet the requirements laid out in a mail on `Questions about writing
-programming manuals and scientific documents`__, by docutils main developer
-David Goodger:
-
-   I'd be happy to include Python source colouring support, and other
-   languages would be welcome too. A multi-language solution would be
-   useful, of course. My issue is providing support for all output formats
-   -- HTML and LaTeX and XML and anything in the future -- simultaneously.
-   Just HTML isn't good enough. Until there is a generic-output solution,
-   this will be something users will have to put together themselves.
-
-__ http://sourceforge.net/mailarchive/message.php?msg_id=12921194
-
-Some older ideas are gathered in Docutils TODO_ document.
-
-.. _TODO: ../../../docutils/docs/dev/todo.html#colorize-python
-
-State of the art
-----------------
-
-There are already docutils extensions providing syntax colouring, e.g:
-
-`listings`_,
-  Since Docutils 0.5, the "latex2e" writer supports syntax highlight of
-  literal blocks via the `listings` package with the
-  ``--literal-block-env=lstlistings`` option. You need to provide a custom
-  style sheet. The stylesheets_ repository provides two LaTeX style sheets
-  for highlighting literal-blocks with "listings".
-
-Odtwriter_, experimental writer for Docutils OpenOffice export supports syntax
-  colours using Pygments_. See also the (outdated) section `Odtwriter syntax`_.
-
-Pygments_
-  is a generic syntax highlighter written completely in Python.
-
-  * Usable as a command-line tool and as a Python package.
-  * Supports about 200 `languages and markup formats`_ (version 1.4).
-  * Already used by the odtwriter_ and Sphinx.
-  * Support for new languages, formats, and styles is added easily (modular
-    structure, Python code, existing documentation).
-  * Well documented and actively maintained.
-  * The web site provides a recipe for `using Pygments in ReST documents`_
-    (used in the legacy `Pygments enhanced docutils front-ends`_).
-
-rest2web_,
-  the "site builder" provides the `colorize`__ macro (using the
-  `Moin-Moin Python colorizer`_)
-
-__ http://www.voidspace.org.uk/python/rest2web/macros.html#colorize
-
-SilverCity_,
-  a C++ library and Python extension that can provide lexical
-  analysis for over 20 different programming languages. A recipe__ for a
-  "code-block" directive provides syntax highlight by SilverCity.
-
-__ http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/252170
-
-Sphinx_
-  features automatic highlighting using the Pygments_ highlighter.
-  It introduces the custom directives
-
-  :code-block: similar to the proposal below,
-  :sourcecode: an alias to "code-block", and
-  :highlight:  configre highlight of "literal blocks".
-
-  (see http://sphinx.pocoo.org/markup/code.html).
-
-Trac_
-  has `reStructuredText support`__ and offers syntax highlighting with
-  a "code-block" directive using GNU Enscript_, SilverCity_, or Pygments_.
-
-__ http://trac.edgewall.org/wiki/WikiRestructuredText
-
-
-Summary
-"""""""
-
-On 2009-02-20, David Goodger wrote in docutils-devel
-
-   I'd like to see the extensions implemented in Bruce and Sphinx etc.
-   folded back into core Docutils eventually. Otherwise we'll end up with
-   incompatible systems.
-
-Pygments_ seems to be the most promising Docutils highlighter.
-
-For printed output and PDFs via LaTeX, the listings_ package is a viable
-alternative.
-
-
-Pygments enhanced docutils front-ends
--------------------------------------
-
-Syntax highlight can be achieved by `front-end scripts`_ combining docutils and
-pygments.
-
-   "something users [will have to] put together themselves"
-
-Advantages:
-  + Easy implementation with no changes to the stock docutils_.
-  + Separation of code blocks and ordinary literal blocks.
-
-Disadvantages:
-  1. "code-block" content is formatted by `pygments`_ and inserted in the
-     document tree as a "raw" node making the approach writer-dependant.
-  2. documents are incompatible with the standard docutils because of the
-     locally defined directive.
-  3. more "invasive" markup distracting from content
-     (no "minimal" code block marker -- three additional lines per code block)
-
-
-Point 1 and 2 lead to the `code-block directive proposal`_.
-
-Point 3 becomes an issue in software documentation and literate programming
-where a code block is the most used block markup. It is addressed in the
-proposal for a `configurable literal block directive`_).
-
-
-`code-block` directive proposal
--------------------------------
-
-Syntax
-""""""
-
-.. note:: This is the first draft for a reStructuredText definition,
-          analogue to other directives in ``directives.txt``.
-
-:Directive Type: "code"
-:Doctree Element: literal_block
-:Directive Arguments: One (`language`), optional.
-:Directive Options: name, class, number-lines.
-:Directive Content: Becomes the body of the literal block.
-
-The "code-block" directive constructs a literal block where the content is
-parsed as source code and syntax highlight rules for `language` are applied.
-If syntax rules for `language` are not known to Docutils, a warning is
-issued and the content is rendered as ordinary literal block with
-additional class arguments: "code" and the value of `language`.
-
-  :number-lines: let pygments include line-numbers
-
-
-The following options are recognized:
-
-``number-lines`` : [start line number]
-    Precede every code line with a line number.
-    The optional argument is the number of the first line (defaut 1).
-
-and the common options `:class:`_ and `:name:`_.
-
 Example::
   The content of the following directive ::
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -182,137 +39,28 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
   is parsed and marked up as Python source code. The actual rendering
   depends on the style-sheet.
 
+TODO
+====
 
-Remarks
-"""""""
-
-* Without language argument, the parsing step is skipped. Use cases:
-
-  * Mark a literal block as pseudo-code.
-
-  * Suppress warnings about a missing Pygments_ module or unknown languages.
-
-  * Do the parsing in the writer or output processor (e.g. LaTeX with
-    the listings_ package).
-
-  The language's name can be given as `class` option.
-
-  Alternative:
-    make the `language` argument compulsory and add a "no-highlight" option.
-
 * TODO: Pygments_ provides filters like VisibleWhitespaceFilter
   add options to use them?
 
 
+* Use syntax-highlight=long as default and add basic highlight rules
+  (keyword, comment, string?) to the default CSS stylesheet to get syntax
+  highlight out-of-the-box?
+  
+  Let the latex2e writer write basic rules in the document preamble if
+  "code" is used in the document?
+  
+* The latex writer should pass the original content and options to a
+  ``lstlistings`` environment. with ``--literal-block-env=lstlistings``.
 
-Include directive option
-""""""""""""""""""""""""
+* Check the `odtwriter`, use common syntax and implementation.
 
-The include directive should get a matching new option:
+* Provide more sample stylesheets in an official stylesheet library.
 
-code: language
-  The entire included text is inserted into the document as if it were the
-  content of a code-block directive (useful for program listings).
 
-Code Role
-"""""""""
-
-For inline code snippets, a `code` role should be implemented. Roles for
-specific languages might be defined via the `role` directive based on the
-generic `code` role.
-
-Implementation
-""""""""""""""
-
-Reading
-'''''''
-
-Felix Wiemann provided a `proof of concept`_ script that utilizes the
-pygments_ parser to parse a source code string and store the result in
-the document tree.
-
-This concept is used in a `pygments_code_block_directive`_ (Source:
-`pygments_code_block_directive.py`_), to define and register a "code-block"
-directive.
-
-* The ``DocutilsInterface`` class uses pygments to parse the content of the
-  directive and classify the tokens using short CSS class names identical to
-  pygments HTML output. If pygments is not available, the unparsed code is
-  returned. TODO: issue a warning.
-
-* The ``code_block_directive`` function inserts the tokens in a "rich"
-  &amp;lt;literal_block&amp;gt; element with "classified" &amp;lt;inline&amp;gt; nodes.
-
-Writing
-'''''''
-
-The writers can use the class information in the &amp;lt;inline&amp;gt; elements to render
-the tokens. They should ignore the class information if they are unable to
-use it or to pass it on.
-
-Running the test script `&amp;lt;../tools/test_pygments_code_block_directive.py&amp;gt;`_
-produces example output for a set of writers.
-
-HTML
-  The "html" writer works out of the box.
-
-  * The rst2html-highlight_ front end registers the "code-block" directive and
-    converts an input file to html.
-
-  * Styling is done with the adapted CSS style sheet `pygments-default.css`_
-    based on docutils' default stylesheet and the output of
-    ``pygmentize -S default -f html``.
-
-  The conversion of `&amp;lt;myfunction.py.txt&amp;gt;`_ looks like
-  `&amp;lt;myfunction.py.htm&amp;gt;`_.
-
-  The "s5" and "pep" writers are not tested yet.
-
-XML
-  "xml" and "pseudoxml" work out of the box.
-
-  The conversion of `myfunction.py.txt`_ looks like
-  `&amp;lt;myfunction.py.xml&amp;gt;`_ respective `&amp;lt;myfunction.py.pseudoxml&amp;gt;`_
-
-LaTeX
-  "latex2e" (SVN version) works out of the box.
-
-  * A style file, e.g. `&amp;lt;pygments-docutilsroles.sty&amp;gt;`_, is required to actually
-    highlight the code in the output. (As with HTML, the pygments-produced
-    style file will not work with docutils' output.)
-
-  * Alternatively, the latex writer could reconstruct the original
-    content and pass it to a ``lstlistings`` environment.
-
-    TODO: This should be the default behaviour with
-    ``--literal-block-env=lstlistings``.
-
-  The LaTeX output of `myfunction.py.txt`_ looks like `&amp;lt;myfunction.py.tex&amp;gt;`_
-  and corresponding PDF like `&amp;lt;myfunction.py.pdf&amp;gt;`_.
-
-OpenOffice
-  The `odtwriter` provides syntax highlight with pygments but uses a
-  different syntax and implementation.
-
-
-TODO
-""""
-
-1. Minimal implementation:
-
-   * move the code from `pygments_code_block_directive.py`_ to "the right
-     place".
-
-   * add the CSS rules to the default style-sheet (see pygments-default.css_)
-
-   * provide a LaTeX style.
-
-2. Write functional test case and sample.
-
-3. Think about an interface for pygments' options (like "encoding" or
-   "linenumbers").
-
-
 Configurable literal block directive
 ------------------------------------
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -385,92 +133,17 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 In the same line, a "default-block-quote" setting or directive could be
 considered to configure the role of a block quote.
 
-Odtwriter syntax
-----------------
 
-.. attention::
-   The content of this section relates to an old version of the
-   `odtwriter`. Things changed with the inclusion of the `odtwriter` into
-   standard Docutils.
 
-   This is only kept for historical reasons.
-
-Dave Kuhlman's odtwriter_ extension can add syntax highlighting
-to ordinary literal blocks.
-
-The ``--add-syntax-highlighting`` command line flag activates syntax
-highlighting in literal blocks. By default, the "python" lexer is used.
-
-You can change this within your reST document with the `sourcecode`
-directive::
-
-  .. sourcecode:: off
-
-  ordinary literal block::
-
-     content set in teletype
-
-  .. sourcecode:: on
-  .. sourcecode:: python
-
-  colourful Python code::
-
-     def hello():
-         print "hello world"
-
-
-The "sourcecode" directive defined by the odtwriter is principally
-different from the "code-block" directive of ``rst2html-pygments``:
-
-* The odtwriter directive does not have content. It is a switch.
-
-* The syntax highlighting state and language/lexer set by this directive
-  remain in effect until the next sourcecode directive is encountered in the
-  reST document.
-
-  ``.. sourcecode:: &amp;lt;newstate&amp;gt;``
-       make highlighting active or inactive.
-       &amp;lt;newstate&amp;gt; is either ``on`` or ``off``.
-
-  ``.. sourcecode:: &amp;lt;lexer&amp;gt;``
-       change the lexer parsing literal code blocks.
-       &amp;lt;lexer&amp;gt; should be one of aliases listed at pygment's `languages and
-       markup formats`_.
-
-I.e. the odtwriter implements a `configurable literal block directive`_
-(but with a slightly different syntax than the proposal above).
-
-
 .. External links
-.. _rest2web: http://www.voidspace.org.uk/python/rest2web/
-.. _Enscript: http://www.gnu.org/software/enscript/enscript.html
-.. _SilverCity: http://silvercity.sourceforge.net/
-.. _Trac: http://trac.edgewall.org/
-.. _Moin-Moin Python colorizer:
-    http://www.standards-schmandards.com/2005/fangs-093/
 .. _odtwriter: http://www.rexx.com/~dkuhlman/odtwriter.html
 .. _Sphinx: http://sphinx.pocoo.org
 .. _listings:
     http://www.ctan.org/tex-archive/help/Catalogue/entries/listings.html
-.. _PyLit: http://pylit.berlios.de
-.. _PyLit Examples: http://pylit.berlios.de/examples/index.html#latex-packages
-
 .. _Pygments: http://pygments.org/
-.. _languages and markup formats: http://pygments.org/languages
-.. _Using Pygments in ReST documents: http://pygments.org/docs/rstdirective/
-
 .. _Docutils: http://docutils.sourceforge.net/
 .. _Docutils Document Tree:
     http://docutils.sf.net/docs/ref/doctree.html#classes
-.. _latex-variants: http://docutils.sourceforge.net/sandbox/latex-variants/
-.. _proof of concept:
-    http://article.gmane.org/gmane.text.docutils.user/3689
 
 .. Internal links
-.. _front-end scripts: ../tools/pygments-enhanced-front-ends
-.. _pygments-default.css: ../data/pygments-default.css
-.. _pygments_code_block_directive.py: ../pygments_code_block_directive.py
-.. _pygments_code_block_directive: pygments_code_block_directive-bunt.py.htm
-.. _rst2html-highlight: ../rst2html-highlight
-.. _pygments-long.css: ../data/pygments-long.css
 .. _stylesheets:       ../../stylesheets/

Deleted: trunk/sandbox/code-block-directive/pygments_code_block_directive.py
===================================================================
--- trunk/sandbox/code-block-directive/pygments_code_block_directive.py2012-05-09 10:41:38 UTC (rev 7429)
+++ trunk/sandbox/code-block-directive/pygments_code_block_directive.py2012-05-09 13:42:58 UTC (rev 7430)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,248 +0,0 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
-#!/usr/bin/python
-# coding: utf-8
-
-# :Author: Georg Brandl; Felix Wiemann; Günter Milde
-# :Date: $Date$
-# :Copyright: This module has been placed in the public domain.
-#
-# This is a merge of `Using Pygments in ReST documents`_ from the pygments_
-# documentation, and a `proof of concept`_ by Felix Wiemann.
-#
-# .. class:: borderless
-#
-# ========== =============================================================
-# 2007-06-01 Removed redundancy from class values.
-# 2007-06-04 Merge of successive tokens of same type
-#            (code taken from pygments.formatters.others).
-# 2007-06-05 Separate docutils formatter script
-#            Use pygments' CSS class names (like the html formatter)
-#            allowing the use of pygments-produced style sheets.
-# 2007-06-07 Merge in the formatting of the parsed tokens
-#            (misnamed as docutils_formatter) as class DocutilsInterface
-# 2007-06-08 Failsave implementation (fallback to a standard literal block
-#            if pygments not found)
-# 2010-11-27 Rename directive from "code-block" to "code".
-#            Fix fallback if pygments not found.
-#            Use class-based interface.
-#            Add "number-lines" option.
-# ========== =============================================================
-#
-# ::
-
-"""Define and register a code directive using pygments"""
-
-# Requirements
-# ------------
-# ::
-
-from docutils import nodes
-from docutils.parsers.rst import directives, Directive
-from docutils.parsers.rst.roles import set_classes
-try:
-    import pygments
-    from pygments.lexers import get_lexer_by_name
-    from pygments.formatters.html import _get_ttype_class
-    with_pygments = True
-except ImportError:
-    with_pygments = False
-
-# Customisation
-# -------------
-#
-# Do not insert inline nodes for the following tokens.
-# (You could add e.g. Token.Punctuation like ``['', 'p']``.) ::
-
-unstyled_tokens = [''] # Token.Text
-
-# Lexer
-# ---------
-#
-# This interface class combines code from
-# pygments.formatters.html and pygments.formatters.others.
-
-class Lexer(object):
-    """Parse `code` lines and yield "classified" tokens.
-
-    Arguments
-
-      code     -- list of source code lines to parse
-      language -- formal language the code is written in.
-
-    Merge subsequent tokens of the same token-type.
-
-    Iterating over an instance yields the tokens as ``(ttype_class, value)``
-    tuples, where `ttype_class` is taken from pygments.token.STANDARD_TYPES
-    and corresponds to the class argument used in pygments html output.
-    """
-
-    def __init__(self, code, language):
-        """
-        Set up a lexical analyzer for `code` in `language`.
-        """
-        self.code = code
-        self.language = language
-        self.lexer = None
-        # get lexical analyzer for `language`:
-        if language in ('', 'text'):
-            return
-        if not with_pygments:
-            raise ApplicationError('Cannot highlight code. '
-                                    'Pygments package not found.')
-        try:
-            self.lexer = get_lexer_by_name(self.language)
-        except pygments.util.ClassNotFound:
-            raise ApplicationError('Cannot highlight code. '
-                'No Pygments lexer found for "%s".' % language)
-
-    # Since version 1.2. (released Jan 01, 2010) Pygments has a 
-    # TokenMergeFilter. ``self.merge(tokens)`` in __iter__ can be 
-    # replaced by ``self.lexer.add_filter('tokenmerge')`` in __init__.
-
-    def merge(self, tokens):
-        """Merge subsequent tokens of same token-type.
-
-        Also strip the final '\n' (added by pygments).
-        """
-        tokens = iter(tokens)
-        (lasttype, lastval) = tokens.next()
-        for ttype, value in tokens:
-            if ttype is lasttype:
-                lastval += value
-            else:
-                yield(lasttype, lastval)
-                (lasttype, lastval) = (ttype, value)
-        if lastval != '\n':
-            yield(lasttype, lastval)
-
-    def __iter__(self):
-        """Parse self.code and yield "classified" tokens
-        """
-        codestring = u'\n'.join(self.code)
-        if self.lexer is None:
-            yield [('', codestring)]
-            return
-        tokens = pygments.lex(codestring, self.lexer)
-        for ttype, value in self.merge(tokens):
-            # yield (ttype, value)  # token type objects
-            yield (_get_ttype_class(ttype), value) # short name strings
-
-
-class NumberLines(object):
-    """Insert linenumber-tokens in front of every newline.
-    
-    Arguments
-    
-       tokens    -- iterable of ``(ttype_class, value)`` tuples
-       startline -- first line number
-       endline   -- last line number
-
-    Iterating over an instance yields the tokens preceded by
-    a ``('ln', '&amp;lt;line number&amp;gt;')`` token for every line.
-    Multi-line tokens from pygments are splitted. """
-
-    def __init__(self, tokens, startline, endline):
-        self.tokens = tokens
-        self.startline = startline
-        # pad linenumbers, e.g. endline == 100 -&amp;gt; fmt_str = '%3d '
-        self.fmt_str = '%%%dd ' % len(str(endline))
-
-    def __iter__(self):
-        lineno = self.startline
-        yield ('ln', self.fmt_str % lineno)
-        for ttype, value in self.tokens:
-            lines = value.split('\n')
-            for line in lines[:-1]:
-                yield (ttype, line + '\n')
-                lineno += 1
-                yield ('ln', self.fmt_str % lineno)
-            yield (ttype, lines[-1])
-
-
-# CodeBlock directive
-# --------------------
-# ::
-
-class CodeBlock(Directive):
-    """Parse and mark up content of a code block.
-    """
-    optional_arguments = 1
-    option_spec = {'class': directives.class_option,
-                   'name': directives.unchanged,
-                   'number-lines': directives.unchanged # integer or None
-                  }
-    has_content = True
-
-    def run(self):
-        self.assert_has_content()
-        if self.arguments:
-            language = self.arguments[0]
-        else:
-            language = ''
-        set_classes(self.options)
-        classes = ['code', language]
-        if 'classes' in self.options:
-            classes.extend(self.options['classes'])
-            
-        # TODO: config setting to skip lexical analysis: 
-        ## if document.settings.no_highlight:
-        ##      language = ''
-
-        # set up lexical analyzer
-        tokens = Lexer(self.content, language)
-
-        if 'number-lines' in self.options:
-            # optional argument `startline`, defaults to 1
-            try: 
-                startline = int(self.options['number-lines'] or 1)
-            except ValueError:
-                raise self.error(':number-lines: with non-integer start value')
-            endline = startline + len(self.content)
-            # add linenumber filter:
-            tokens = NumberLines(tokens, startline, endline)
-
-        node = nodes.literal_block('\n'.join(self.content), classes=classes)
-        self.add_name(node)
-        
-        # analyze content and add nodes for every token
-        for cls, value in tokens:
-            # print (cls, value)
-            if cls in unstyled_tokens:
-                # insert as Text to decrease the verbosity of the output.
-                node += nodes.Text(value, value)
-            else:
-                node += nodes.inline(value, value, classes=[cls])
-
-        return [node]
-
-
-# Register Directive
-# ------------------
-# ::
-
-directives.register_directive('code', CodeBlock)
-
-# .. _doctutils: http://docutils.sf.net/
-# .. _pygments: http://pygments.org/
-# .. _Using Pygments in ReST documents: http://pygments.org/docs/rstdirective/
-# .. _proof of concept:
-#      http://article.gmane.org/gmane.text.docutils.user/3689
-#
-# Test output
-# -----------
-#
-# If called from the command line, call the docutils publisher to render the
-# input::
-
-if __name__ == '__main__':
-    from docutils.core import publish_cmdline, default_description
-    description = 'code-block directive test output' + default_description
-    try:
-        import locale
-        locale.setlocale(locale.LC_ALL, '')
-    except:
-        pass
-    # Uncomment the desired output format:
-    # publish_cmdline(writer_name='pseudoxml', description=description)
-    # publish_cmdline(writer_name='xml', description=description)
-    # publish_cmdline(writer_name='html', description=description)
-    publish_cmdline(writer_name='latex', description=description)

Deleted: trunk/sandbox/code-block-directive/rst2html-highlight.py
===================================================================
--- trunk/sandbox/code-block-directive/rst2html-highlight.py2012-05-09 10:41:38 UTC (rev 7429)
+++ trunk/sandbox/code-block-directive/rst2html-highlight.py2012-05-09 13:42:58 UTC (rev 7430)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,53 +0,0 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
-#!/usr/bin/python
-# coding: utf-8
-
-# rst2html-highlight
-# ==================
-# 
-# Docutils front-end with syntax highlight.
-# 
-# :Author: David Goodger, Georg Brandl, Günter Milde
-# :Date: $Date: 2008-05-22 08:42:52 +0200 (Do, 22. Mai 2008) $
-# :Copyright: This module has been placed in the public domain.
-# 
-# This is a merge of the docutils_ `rst2html` front end with an extension
-# suggestion by Felix Wiemann.
-# 
-# ::
-
-"""
-A front end to docutils, producing HTML with syntax colouring using pygments
-
-Generates (X)HTML documents from standalone reStructuredText sources. Uses
-`pygments` to parse and mark up the content of ``.. code::` directives.
-Needs an adapted stylesheet
-"""
-
-# Requirements
-# ------------
-# 
-# ::
-
-try:
-    import locale
-    locale.setlocale(locale.LC_ALL, '')
-except:
-    pass
-
-from docutils.core import publish_cmdline, default_description
-
-# The `pygments_code_block_directive`_ module defines and registers a new
-# directive `code` that uses the `pygments`_ source highlighter to
-# render code in color::
-
-import pygments_code_block_directive
-
-# Call the docutils publisher to render the input as html::
-
-description = __doc__ + default_description
-publish_cmdline(writer_name='html', description=description)
-
-# .. _docutils: http://docutils.sf.net/
-# .. _pygments_code_block_directive: pygments_code_block_directive.py
-# .. _pygments: http://pygments.org/
-# .. _Using Pygments in ReST documents: http://pygments.org/docs/rstdirective/

Deleted: trunk/sandbox/code-block-directive/rst2latex-highlight.py
===================================================================
--- trunk/sandbox/code-block-directive/rst2latex-highlight.py2012-05-09 10:41:38 UTC (rev 7429)
+++ trunk/sandbox/code-block-directive/rst2latex-highlight.py2012-05-09 13:42:58 UTC (rev 7430)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,53 +0,0 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
-#!/usr/bin/python
-
-# rst2latex-highlight
-# ===================
-# 
-# Docutils front-end with syntax highlight.
-# 
-# :Author: David Goodger, a Pygments author|contributor, Guenter Milde
-# :Date: $Date: 2008-05-22 08:42:52 +0200 (Do, 22. Mai 2008) $
-# :Copyright: This module has been placed in the public domain.
-# 
-# This is a merge of the docutils_ `rst2latex` front end with an extension
-# suggestion taken from the Pygments_ documentation.
-# 
-# ::
-
-"""
-A front end to docutils, producing LaTeX with syntax colouring using pygments
-
-Generates LaTeX documents from standalone reStructuredText sources. Uses the
-`Pygments` syntax highlighter to parse and mark up the content of ``..
-code::` directives. Needs an adapted stylesheet.
-"""
-
-# Requirements
-# ------------
-# 
-# ::
-
-try:
-    import locale
-    locale.setlocale(locale.LC_ALL, '')
-except:
-    pass
-
-from docutils.core import publish_cmdline, default_description
-
-# `&amp;lt;pygments_code_block_directive.py&amp;gt;`_ defines and registers a new
-# directive `code` that uses the `Pygments`_ syntax highlighter to
-# render code in color::
-
-import pygments_code_block_directive
-
-# Call the docutils publisher to render the input as latex::
-
-description = __doc__ + default_description
-publish_cmdline(writer_name='latex2e', description=description)
-
-
-# .. References:
-# .. _docutils: http://docutils.sf.net/
-# .. _pygments: http://pygments.org/
-# .. _Using Pygments in ReST documents: http://pygments.org/docs/rstdirective/

Deleted: trunk/sandbox/code-block-directive/tools/makesty.py
===================================================================
--- trunk/sandbox/code-block-directive/tools/makesty.py2012-05-09 10:41:38 UTC (rev 7429)
+++ trunk/sandbox/code-block-directive/tools/makesty.py2012-05-09 13:42:58 UTC (rev 7430)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,62 +0,0 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
-#! /usr/bin/env python
-# coding: utf8
-# Copyright: Raphael 'kena' Poss &amp;lt;r.c.poss&amp;lt; at &amp;gt;uva.nl&amp;gt;
-# this file is placed in the public domain.
-#
-# Convert a CSS stylesheet into one for Docutils' LaTeX output.
-#
-# Usage example::
-#
-#    pygmentize -S default -f html | python makesty.py &amp;gt;pygments-default.sty
-#
-# Versions:
-#
-# 2012-05-09: Günter Milde &amp;lt;milde&amp;lt; at &amp;gt;users.sf.net&amp;gt;:
-#             Bugfix: do not fail at lines without comment.
-#             Support for digits in role names.
-#             ``\providecommand`` instead of ``\newcommand``.
-
-import sys
-import re
-
-print '% Stylesheet for syntax highlight with Docutils'
-print '% Generated by makesty.py from a Pygments CSS style'
-print '% (output of `pygmentize -S &amp;lt;style&amp;gt; -f html`).'
-print
-print r'\RequirePackage{color}'
-
-cnt = 0
-for l in sys.stdin:
-
-    if '/*' in l:
-        print "% " + l.split('*')[1]
-    key = l.split(' ', 1)[0][1:]
-
-    s = '#1'
-
-    if 'color:' in l:
-        col = l.split('#',1)[1][:6]
-        r = float(int(col[0:2], 16)) / 255.
-        g = float(int(col[2:4], 16)) / 255.
-        b = float(int(col[4:6], 16)) / 255.
-        s = r'\textcolor[rgb]{%.2f,%.2f,%.2f}{%s}' % (r, g, b, s)
-
-    if 'font-style: italic' in l:
-        s = r'\textit{%s}' % s
-    if 'font-weight: bold' in l:
-        s = r'\textbf{%s}' % s
-
-    if 'border:' in l:
-        col = l.split('#',1)[1][:6]
-        r = float(int(col[0:2], 16)) / 255.
-        g = float(int(col[2:4], 16)) / 255.
-        b = float(int(col[4:6], 16)) / 255.
-        cname = 'DUcolor%d' % cnt
-        cnt += 1
-        print r'\definecolor{%s}{rgb}{%.2f,%.2f,%.2f}' % (cname, r, g, b)
-        s = r'\colorbox{%s}{%s}' % (cname, s)
-
-    if re.match(r'.*[0-9]', key) is None:
-        print r'\providecommand*\DUrole%s[1]{%s}' % (key, s)
-    else:
-        print r'\providecommand\csname DUrole%s\endcsname[1]{%s}' % (key, s)

Deleted: trunk/sandbox/code-block-directive/tools/pygments-docutilsroles.sty
===================================================================
--- trunk/sandbox/code-block-directive/tools/pygments-docutilsroles.sty2012-05-09 10:41:38 UTC (rev 7429)
+++ trunk/sandbox/code-block-directive/tools/pygments-docutilsroles.sty2012-05-09 13:42:58 UTC (rev 7430)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,122 +0,0 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
-% Stylesheet generated by makesty.py
-\usepackage{color}
-%  Comment 
-\newcommand\docutilsrolec[1]{\textit{\textcolor[rgb]{0.25,0.50,0.50}{#1}}}
-%  Error 
-\definecolor{ducolor0}{rgb}{1.00,0.00,0.00}
-\newcommand\docutilsroleerr[1]{\colorbox{ducolor0}{#1}}
-%  Keyword 
-\newcommand\docutilsrolek[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}}
-%  Operator 
-\newcommand\docutilsroleo[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
-%  Comment.Multiline 
-\newcommand\docutilsrolecm[1]{\textit{\textcolor[rgb]{0.25,0.50,0.50}{#1}}}
-%  Comment.Preproc 
-\newcommand\docutilsrolecp[1]{\textcolor[rgb]{0.74,0.48,0.00}{#1}}
-%  Comment.Single 
-% Can't generate style for 'c1' because 'docutilsrolec1' is not a valid macro id.
-%  Comment.Special 
-\newcommand\docutilsrolecs[1]{\textit{\textcolor[rgb]{0.25,0.50,0.50}{#1}}}
-%  Generic.Deleted 
-\newcommand\docutilsrolegd[1]{\textcolor[rgb]{0.63,0.00,0.00}{#1}}
-%  Generic.Emph 
-\newcommand\docutilsrolege[1]{\textit{#1}}
-%  Generic.Error 
-\newcommand\docutilsrolegr[1]{\textcolor[rgb]{1.00,0.00,0.00}{#1}}
-%  Generic.Heading 
-\newcommand\docutilsrolegh[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.50}{#1}}}
-%  Generic.Inserted 
-\newcommand\docutilsrolegi[1]{\textcolor[rgb]{0.00,0.63,0.00}{#1}}
-%  Generic.Output 
-\newcommand\docutilsrolego[1]{\textcolor[rgb]{0.50,0.50,0.50}{#1}}
-%  Generic.Prompt 
-\newcommand\docutilsrolegp[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.50}{#1}}}
-%  Generic.Strong 
-\newcommand\docutilsrolegs[1]{\textbf{#1}}
-%  Generic.Subheading 
-\newcommand\docutilsrolegu[1]{\textbf{\textcolor[rgb]{0.50,0.00,0.50}{#1}}}
-%  Generic.Traceback 
-\newcommand\docutilsrolegt[1]{\textcolor[rgb]{0.00,0.25,0.82}{#1}}
-%  Keyword.Constant 
-\newcommand\docutilsrolekc[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}}
-%  Keyword.Declaration 
-\newcommand\docutilsrolekd[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}}
-%  Keyword.Pseudo 
-\newcommand\docutilsrolekp[1]{\textcolor[rgb]{0.00,0.50,0.00}{#1}}
-%  Keyword.Reserved 
-\newcommand\docutilsrolekr[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}}
-%  Keyword.Type 
-\newcommand\docutilsrolekt[1]{\textcolor[rgb]{0.69,0.00,0.25}{#1}}
-%  Literal.Number 
-\newcommand\docutilsrolem[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
-%  Literal.String 
-\newcommand\docutilsroles[1]{\textcolor[rgb]{0.73,0.13,0.13}{#1}}
-%  Name.Attribute 
-\newcommand\docutilsrolena[1]{\textcolor[rgb]{0.49,0.56,0.16}{#1}}
-%  Name.Builtin 
-\newcommand\docutilsrolenb[1]{\textcolor[rgb]{0.00,0.50,0.00}{#1}}
-%  Name.Class 
-\newcommand\docutilsrolenc[1]{\textbf{\textcolor[rgb]{0.00,0.00,1.00}{#1}}}
-%  Name.Constant 
-\newcommand\docutilsroleno[1]{\textcolor[rgb]{0.53,0.00,0.00}{#1}}
-%  Name.Decorator 
-\newcommand\docutilsrolend[1]{\textcolor[rgb]{0.67,0.13,1.00}{#1}}
-%  Name.Entity 
-\newcommand\docutilsroleni[1]{\textbf{\textcolor[rgb]{0.60,0.60,0.60}{#1}}}
-%  Name.Exception 
-\newcommand\docutilsrolene[1]{\textbf{\textcolor[rgb]{0.82,0.25,0.23}{#1}}}
-%  Name.Function 
-\newcommand\docutilsrolenf[1]{\textcolor[rgb]{0.00,0.00,1.00}{#1}}
-%  Name.Label 
-\newcommand\docutilsrolenl[1]{\textcolor[rgb]{0.63,0.63,0.00}{#1}}
-%  Name.Namespace 
-\newcommand\docutilsrolenn[1]{\textbf{\textcolor[rgb]{0.00,0.00,1.00}{#1}}}
-%  Name.Tag 
-\newcommand\docutilsrolent[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}}
-%  Name.Variable 
-\newcommand\docutilsrolenv[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}}
-%  Operator.Word 
-\newcommand\docutilsroleow[1]{\textbf{\textcolor[rgb]{0.67,0.13,1.00}{#1}}}
-%  Text.Whitespace 
-\newcommand\docutilsrolew[1]{\textcolor[rgb]{0.73,0.73,0.73}{#1}}
-%  Literal.Number.Float 
-\newcommand\docutilsrolemf[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
-%  Literal.Number.Hex 
-\newcommand\docutilsrolemh[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
-%  Literal.Number.Integer 
-\newcommand\docutilsrolemi[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
-%  Literal.Number.Oct 
-\newcommand\docutilsrolemo[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
-%  Literal.String.Backtick 
-\newcommand\docutilsrolesb[1]{\textcolor[rgb]{0.73,0.13,0.13}{#1}}
-%  Literal.String.Char 
-\newcommand\docutilsrolesc[1]{\textcolor[rgb]{0.73,0.13,0.13}{#1}}
-%  Literal.String.Doc 
-\newcommand\docutilsrolesd[1]{\textit{\textcolor[rgb]{0.73,0.13,0.13}{#1}}}
-%  Literal.String.Double 
-% Can't generate style for 's2' because 'docutilsroles2' is not a valid macro id.
-%  Literal.String.Escape 
-\newcommand\docutilsrolese[1]{\textbf{\textcolor[rgb]{0.73,0.40,0.13}{#1}}}
-%  Literal.String.Heredoc 
-\newcommand\docutilsrolesh[1]{\textcolor[rgb]{0.73,0.13,0.13}{#1}}
-%  Literal.String.Interpol 
-\newcommand\docutilsrolesi[1]{\textbf{\textcolor[rgb]{0.73,0.40,0.53}{#1}}}
-%  Literal.String.Other 
-\newcommand\docutilsrolesx[1]{\textcolor[rgb]{0.00,0.50,0.00}{#1}}
-%  Literal.String.Regex 
-\newcommand\docutilsrolesr[1]{\textcolor[rgb]{0.73,0.40,0.53}{#1}}
-%  Literal.String.Single 
-% Can't generate style for 's1' because 'docutilsroles1' is not a valid macro id.
-%  Literal.String.Symbol 
-\newcommand\docutilsroless[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}}
-%  Name.Builtin.Pseudo 
-\newcommand\docutilsrolebp[1]{\textcolor[rgb]{0.00,0.50,0.00}{#1}}
-%  Name.Variable.Class 
-\newcommand\docutilsrolevc[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}}
-%  Name.Variable.Global 
-\newcommand\docutilsrolevg[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}}
-%  Name.Variable.Instance 
-\newcommand\docutilsrolevi[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}}
-%  Literal.Number.Integer.Long 
-\newcommand\docutilsroleil[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
-\newcommand\docutilsrolep[1]{#1}

Deleted: trunk/sandbox/code-block-directive/tools/test_pygments_code_block_directive.py
===================================================================
--- trunk/sandbox/code-block-directive/tools/test_pygments_code_block_directive.py2012-05-09 10:41:38 UTC (rev 7429)
+++ trunk/sandbox/code-block-directive/tools/test_pygments_code_block_directive.py2012-05-09 13:42:58 UTC (rev 7430)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,64 +0,0 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
-#!/usr/bin/env python
-# -*- coding: iso-8859-1 -*-
-
-# Test the parsing and formatting by pygments:
-
-# :Author: Felix Wiemann; Günter Milde
-# :Date: $Date$
-# :Copyright: This module has been placed in the public domain.
-
-# Requirements
-# ------------
-
-from docutils import nodes, utils, core
-
-# Prepend parent dir to the PYTHONPATH (This is a hack to get this test
-# working without installing the pygments_code_block_directive module.
-# Not needed if the module is installed in the PYTHONPATH)
-import sys
-sys.path.insert(0, '..')
-
-from pygments_code_block_directive import DocutilsInterface
-
-# Test data
-# ---------
-
-code_sample = """\
-def my_function():
-    "just a test"
-    print 8/2
-"""
-
-language = "python"
-
-# Do not insert inline nodes for the following tokens.
-# (You could add e.g. Token.Punctuation like ``['', 'p']``.) ::
-unstyled_tokens = ['']
-
-# Set up a document tree
-# ----------------------
-
-document = utils.new_document('generated')
-literal_block = nodes.literal_block(classes=["code", language])
-document += literal_block
-
-
-# Parse code and fill the &amp;lt;literal_block&amp;gt;
-# ----------------------------------------
-
-for cls, value in DocutilsInterface(code_sample, language):
-    if cls in unstyled_tokens:
-        # insert as Text to decrease the verbosity of the output.
-        node = nodes.Text(value, value)
-    else:
-        node = nodes.inline(value, value, classes=[cls])
-    literal_block += node
-
-# Write
-# -----
-
-writer_names = ('html', 'pseudoxml', 'xml', 'latex', 'newlatex2e', 's5')
-for name in writer_names[:]:
-    print "\nusing writer %r\n" % name
-    print core.publish_from_doctree(document, writer_name=name)
-

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Docutils-checkins mailing list
Docutils-checkins&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-checkins
&lt;/pre&gt;</description>
    <dc:creator>milde&lt; at &gt;users.sourceforge.net</dc:creator>
    <dc:date>2012-05-09T13:42:59</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.cvs/7704">
    <title>SF.net SVN: docutils:[7429]trunk/sandbox/stylesheets</title>
    <link>http://comments.gmane.org/gmane.text.docutils.cvs/7704</link>
    <description>&lt;pre&gt;Revision: 7429
          http://docutils.svn.sourceforge.net/docutils/?rev=7429&amp;amp;view=rev
Author:   milde
Date:     2012-05-09 10:41:38 +0000 (Wed, 09 May 2012)
Log Message:
-----------
Example stylesheets for syntax highlight of code snippets.

Modified Paths:
--------------
    trunk/sandbox/stylesheets/index.txt

Added Paths:
-----------
    trunk/sandbox/stylesheets/pygments-default.css
    trunk/sandbox/stylesheets/pygments-default.sty
    trunk/sandbox/stylesheets/pygments-long.css
    trunk/sandbox/stylesheets/pygments-long.sty

Modified: trunk/sandbox/stylesheets/index.txt
===================================================================
--- trunk/sandbox/stylesheets/index.txt2012-05-09 10:32:30 UTC (rev 7428)
+++ trunk/sandbox/stylesheets/index.txt2012-05-09 10:41:38 UTC (rev 7429)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -38,9 +38,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
   Replaces the horizontal line with three stars as often seen in novels.
 
-.. _transition: ../../docutils/docs/ref/rst/restructuredtext.html#transitions
 
+* `&amp;lt;pygments-default.css&amp;gt;`_, `&amp;lt;pygments-long.css&amp;gt;`_:
+  Examples/templates for syntax highlight of code_ snippets.
 
+
 LaTeX Style Sheets
 ==================
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -68,6 +70,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
   Replaces the horizontal line with three stars as often seen in novels.
 
+* `&amp;lt;pygments-default.sty&amp;gt;`_, `&amp;lt;pygments-long.sty&amp;gt;`_:
+  Examples/templates for syntax highlight of code_ snippets.
 
 .. References
    ==========
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -78,7 +82,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 .. _Generating LaTeX with Docutils:
    ../../docutils/docs/user/latex.html
 
+.. _transition: ../../docutils/docs/ref/rst/restructuredtext.html#transitions
+.. _code: ../../docutils/docs/ref/rst/directives.html#code
 
+
 
 ..
    Local Variables:

Added: trunk/sandbox/stylesheets/pygments-default.css
===================================================================
--- trunk/sandbox/stylesheets/pygments-default.css                        (rev 0)
+++ trunk/sandbox/stylesheets/pygments-default.css2012-05-09 10:41:38 UTC (rev 7429)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,63 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/* generated with ``pygmentize -S default -f html -a pre.code`` */
+pre.code .hll { background-color: #ffffcc }
+pre.code  { background: #f8f8f8; }
+pre.code .c { color: #408080; font-style: italic } /* Comment */
+pre.code .err { border: 1px solid #FF0000 } /* Error */
+pre.code .k { color: #008000; font-weight: bold } /* Keyword */
+pre.code .o { color: #666666 } /* Operator */
+pre.code .cm { color: #408080; font-style: italic } /* Comment.Multiline */
+pre.code .cp { color: #BC7A00 } /* Comment.Preproc */
+pre.code .c1 { color: #408080; font-style: italic } /* Comment.Single */
+pre.code .cs { color: #408080; font-style: italic } /* Comment.Special */
+pre.code .gd { color: #A00000 } /* Generic.Deleted */
+pre.code .ge { font-style: italic } /* Generic.Emph */
+pre.code .gr { color: #FF0000 } /* Generic.Error */
+pre.code .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+pre.code .gi { color: #00A000 } /* Generic.Inserted */
+pre.code .go { color: #808080 } /* Generic.Output */
+pre.code .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
+pre.code .gs { font-weight: bold } /* Generic.Strong */
+pre.code .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+pre.code .gt { color: #0040D0 } /* Generic.Traceback */
+pre.code .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
+pre.code .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
+pre.code .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
+pre.code .kp { color: #008000 } /* Keyword.Pseudo */
+pre.code .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
+pre.code .kt { color: #B00040 } /* Keyword.Type */
+pre.code .m { color: #666666 } /* Literal.Number */
+pre.code .s { color: #BA2121 } /* Literal.String */
+pre.code .na { color: #7D9029 } /* Name.Attribute */
+pre.code .nb { color: #008000 } /* Name.Builtin */
+pre.code .nc { color: #0000FF; font-weight: bold } /* Name.Class */
+pre.code .no { color: #880000 } /* Name.Constant */
+pre.code .nd { color: #AA22FF } /* Name.Decorator */
+pre.code .ni { color: #999999; font-weight: bold } /* Name.Entity */
+pre.code .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
+pre.code .nf { color: #0000FF } /* Name.Function */
+pre.code .nl { color: #A0A000 } /* Name.Label */
+pre.code .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
+pre.code .nt { color: #008000; font-weight: bold } /* Name.Tag */
+pre.code .nv { color: #19177C } /* Name.Variable */
+pre.code .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
+pre.code .w { color: #bbbbbb } /* Text.Whitespace */
+pre.code .mf { color: #666666 } /* Literal.Number.Float */
+pre.code .mh { color: #666666 } /* Literal.Number.Hex */
+pre.code .mi { color: #666666 } /* Literal.Number.Integer */
+pre.code .mo { color: #666666 } /* Literal.Number.Oct */
+pre.code .sb { color: #BA2121 } /* Literal.String.Backtick */
+pre.code .sc { color: #BA2121 } /* Literal.String.Char */
+pre.code .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
+pre.code .s2 { color: #BA2121 } /* Literal.String.Double */
+pre.code .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
+pre.code .sh { color: #BA2121 } /* Literal.String.Heredoc */
+pre.code .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
+pre.code .sx { color: #008000 } /* Literal.String.Other */
+pre.code .sr { color: #BB6688 } /* Literal.String.Regex */
+pre.code .s1 { color: #BA2121 } /* Literal.String.Single */
+pre.code .ss { color: #19177C } /* Literal.String.Symbol */
+pre.code .bp { color: #008000 } /* Name.Builtin.Pseudo */
+pre.code .vc { color: #19177C } /* Name.Variable.Class */
+pre.code .vg { color: #19177C } /* Name.Variable.Global */
+pre.code .vi { color: #19177C } /* Name.Variable.Instance */
+pre.code .il { color: #666666 } /* Literal.Number.Integer.Long */


Property changes on: trunk/sandbox/stylesheets/pygments-default.css
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Added: trunk/sandbox/stylesheets/pygments-default.sty
===================================================================
--- trunk/sandbox/stylesheets/pygments-default.sty                        (rev 0)
+++ trunk/sandbox/stylesheets/pygments-default.sty2012-05-09 10:41:38 UTC (rev 7429)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,127 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+% Stylesheet for syntax highlight with Docutils
+% Generated by makesty.py from a Pygments CSS style
+% (output of `pygmentize -S &amp;lt;style&amp;gt; -f html`).
+
+\RequirePackage{color}
+\providecommand*\DUrolehll[1]{\textcolor[rgb]{1.00,1.00,0.80}{#1}}
+%  Comment 
+\providecommand*\DUrolec[1]{\textit{\textcolor[rgb]{0.25,0.50,0.50}{#1}}}
+%  Error 
+\definecolor{DUcolor0}{rgb}{1.00,0.00,0.00}
+\providecommand*\DUroleerr[1]{\colorbox{DUcolor0}{#1}}
+%  Keyword 
+\providecommand*\DUrolek[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}}
+%  Operator 
+\providecommand*\DUroleo[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
+%  Comment.Multiline 
+\providecommand*\DUrolecm[1]{\textit{\textcolor[rgb]{0.25,0.50,0.50}{#1}}}
+%  Comment.Preproc 
+\providecommand*\DUrolecp[1]{\textcolor[rgb]{0.74,0.48,0.00}{#1}}
+%  Comment.Single 
+\providecommand\csname DUrolec1\endcsname[1]{\textit{\textcolor[rgb]{0.25,0.50,0.50}{#1}}}
+%  Comment.Special 
+\providecommand*\DUrolecs[1]{\textit{\textcolor[rgb]{0.25,0.50,0.50}{#1}}}
+%  Generic.Deleted 
+\providecommand*\DUrolegd[1]{\textcolor[rgb]{0.63,0.00,0.00}{#1}}
+%  Generic.Emph 
+\providecommand*\DUrolege[1]{\textit{#1}}
+%  Generic.Error 
+\providecommand*\DUrolegr[1]{\textcolor[rgb]{1.00,0.00,0.00}{#1}}
+%  Generic.Heading 
+\providecommand*\DUrolegh[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.50}{#1}}}
+%  Generic.Inserted 
+\providecommand*\DUrolegi[1]{\textcolor[rgb]{0.00,0.63,0.00}{#1}}
+%  Generic.Output 
+\providecommand*\DUrolego[1]{\textcolor[rgb]{0.50,0.50,0.50}{#1}}
+%  Generic.Prompt 
+\providecommand*\DUrolegp[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.50}{#1}}}
+%  Generic.Strong 
+\providecommand*\DUrolegs[1]{\textbf{#1}}
+%  Generic.Subheading 
+\providecommand*\DUrolegu[1]{\textbf{\textcolor[rgb]{0.50,0.00,0.50}{#1}}}
+%  Generic.Traceback 
+\providecommand*\DUrolegt[1]{\textcolor[rgb]{0.00,0.25,0.82}{#1}}
+%  Keyword.Constant 
+\providecommand*\DUrolekc[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}}
+%  Keyword.Declaration 
+\providecommand*\DUrolekd[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}}
+%  Keyword.Namespace 
+\providecommand*\DUrolekn[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}}
+%  Keyword.Pseudo 
+\providecommand*\DUrolekp[1]{\textcolor[rgb]{0.00,0.50,0.00}{#1}}
+%  Keyword.Reserved 
+\providecommand*\DUrolekr[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}}
+%  Keyword.Type 
+\providecommand*\DUrolekt[1]{\textcolor[rgb]{0.69,0.00,0.25}{#1}}
+%  Literal.Number 
+\providecommand*\DUrolem[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
+%  Literal.String 
+\providecommand*\DUroles[1]{\textcolor[rgb]{0.73,0.13,0.13}{#1}}
+%  Name.Attribute 
+\providecommand*\DUrolena[1]{\textcolor[rgb]{0.49,0.56,0.16}{#1}}
+%  Name.Builtin 
+\providecommand*\DUrolenb[1]{\textcolor[rgb]{0.00,0.50,0.00}{#1}}
+%  Name.Class 
+\providecommand*\DUrolenc[1]{\textbf{\textcolor[rgb]{0.00,0.00,1.00}{#1}}}
+%  Name.Constant 
+\providecommand*\DUroleno[1]{\textcolor[rgb]{0.53,0.00,0.00}{#1}}
+%  Name.Decorator 
+\providecommand*\DUrolend[1]{\textcolor[rgb]{0.67,0.13,1.00}{#1}}
+%  Name.Entity 
+\providecommand*\DUroleni[1]{\textbf{\textcolor[rgb]{0.60,0.60,0.60}{#1}}}
+%  Name.Exception 
+\providecommand*\DUrolene[1]{\textbf{\textcolor[rgb]{0.82,0.25,0.23}{#1}}}
+%  Name.Function 
+\providecommand*\DUrolenf[1]{\textcolor[rgb]{0.00,0.00,1.00}{#1}}
+%  Name.Label 
+\providecommand*\DUrolenl[1]{\textcolor[rgb]{0.63,0.63,0.00}{#1}}
+%  Name.Namespace 
+\providecommand*\DUrolenn[1]{\textbf{\textcolor[rgb]{0.00,0.00,1.00}{#1}}}
+%  Name.Tag 
+\providecommand*\DUrolent[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}}
+%  Name.Variable 
+\providecommand*\DUrolenv[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}}
+%  Operator.Word 
+\providecommand*\DUroleow[1]{\textbf{\textcolor[rgb]{0.67,0.13,1.00}{#1}}}
+%  Text.Whitespace 
+\providecommand*\DUrolew[1]{\textcolor[rgb]{0.73,0.73,0.73}{#1}}
+%  Literal.Number.Float 
+\providecommand*\DUrolemf[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
+%  Literal.Number.Hex 
+\providecommand*\DUrolemh[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
+%  Literal.Number.Integer 
+\providecommand*\DUrolemi[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
+%  Literal.Number.Oct 
+\providecommand*\DUrolemo[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
+%  Literal.String.Backtick 
+\providecommand*\DUrolesb[1]{\textcolor[rgb]{0.73,0.13,0.13}{#1}}
+%  Literal.String.Char 
+\providecommand*\DUrolesc[1]{\textcolor[rgb]{0.73,0.13,0.13}{#1}}
+%  Literal.String.Doc 
+\providecommand*\DUrolesd[1]{\textit{\textcolor[rgb]{0.73,0.13,0.13}{#1}}}
+%  Literal.String.Double 
+\providecommand\csname DUroles2\endcsname[1]{\textcolor[rgb]{0.73,0.13,0.13}{#1}}
+%  Literal.String.Escape 
+\providecommand*\DUrolese[1]{\textbf{\textcolor[rgb]{0.73,0.40,0.13}{#1}}}
+%  Literal.String.Heredoc 
+\providecommand*\DUrolesh[1]{\textcolor[rgb]{0.73,0.13,0.13}{#1}}
+%  Literal.String.Interpol 
+\providecommand*\DUrolesi[1]{\textbf{\textcolor[rgb]{0.73,0.40,0.53}{#1}}}
+%  Literal.String.Other 
+\providecommand*\DUrolesx[1]{\textcolor[rgb]{0.00,0.50,0.00}{#1}}
+%  Literal.String.Regex 
+\providecommand*\DUrolesr[1]{\textcolor[rgb]{0.73,0.40,0.53}{#1}}
+%  Literal.String.Single 
+\providecommand\csname DUroles1\endcsname[1]{\textcolor[rgb]{0.73,0.13,0.13}{#1}}
+%  Literal.String.Symbol 
+\providecommand*\DUroless[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}}
+%  Name.Builtin.Pseudo 
+\providecommand*\DUrolebp[1]{\textcolor[rgb]{0.00,0.50,0.00}{#1}}
+%  Name.Variable.Class 
+\providecommand*\DUrolevc[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}}
+%  Name.Variable.Global 
+\providecommand*\DUrolevg[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}}
+%  Name.Variable.Instance 
+\providecommand*\DUrolevi[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}}
+%  Literal.Number.Integer.Long 
+\providecommand*\DUroleil[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}

Added: trunk/sandbox/stylesheets/pygments-long.css
===================================================================
--- trunk/sandbox/stylesheets/pygments-long.css                        (rev 0)
+++ trunk/sandbox/stylesheets/pygments-long.css2012-05-09 10:41:38 UTC (rev 7429)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,58 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/* example stylesheet for Docutils */
+
+/* :Author:    Günter Milde */
+/* :Copyright: © 2012 G. Milde */
+/* :License:   This stylesheet is placed in the public domain. */
+
+/* Syntax highlight rules for HTML documents generated with Docutils */
+/* using the ``--syntax-highlight=long`` option (new in v. 0.9). */
+
+/* This stylesheet implements Pygment's "default" style with less rules than */
+/* pygments-default using class hierarchies.                                 */
+/* Use it as example for "handcrafted" styles with only few rules.      */
+
+pre.code                              { background: #f8f8f8; }
+pre.code .comment                     { color: #008800; font-style: italic }
+pre.code .error                       { border: 1px solid #FF0000 }
+pre.code .keyword                     { color: #AA22FF; font-weight: bold }
+pre.code .operator                    { color: #666666 }
+pre.code .comment                     { color: #008800 }
+pre.code .comment.multiline           { font-style: italic }
+pre.code .comment.single              { font-style: italic }
+pre.code .generic.deleted             { color: #A00000 }
+pre.code .generic.emph                { font-style: italic }
+pre.code .generic.error               { color: #FF0000 }
+pre.code .generic.heading             { color: #000080; font-weight: bold }
+pre.code .generic.inserted            { color: #00A000 }
+pre.code .generic.output              { color: #808080 }
+pre.code .generic.prompt              { color: #000080; font-weight: bold }
+pre.code .generic.strong              { font-weight: bold }
+pre.code .generic.subheading          { color: #800080; font-weight: bold }
+pre.code .generic.traceback           { color: #0040D0 }
+pre.code .keyword                     { color: #AA22FF; font-weight: bold }
+pre.code .keyword.pseudo              { color: font-weight: normal }
+pre.code .literal.number              { color: #666666 }
+pre.code .literal.string              { color: #BB4444 }
+pre.code .name.attribute              { color: #BB4444 }
+pre.code .name.builtin                { color: #AA22FF }
+pre.code .name.class                  { color: #0000FF }
+pre.code .name.constant               { color: #880000 }
+pre.code .name.decorator              { color: #AA22FF }
+pre.code .name.entity                 { color: #999999; font-weight: bold }
+pre.code .name.exception              { color: #D2413A; font-weight: bold }
+pre.code .name.function               { color: #00A000 }
+pre.code .name.label                  { color: #A0A000 }
+pre.code .name.namespace              { color: #0000FF; font-weight: bold }
+pre.code .name.tag                    { color: #008000; font-weight: bold }
+pre.code .name.variable               { color: #B8860B }
+pre.code .operator.word               { color: #AA22FF; font-weight: bold }
+pre.code .literal.number              { color: #666666 }
+pre.code .literal.string              { color: #BB4444 }
+pre.code .literal.string.doc          { color: #BB4444; font-style: italic }
+pre.code .literal.string.escape       { color: #BB6622; font-weight: bold }
+pre.code .literal.string.interpol     { color: #BB6688; font-weight: bold }
+pre.code .literal.string.other        { color: #008000 }
+pre.code .literal.string.regex        { color: #BB6688 }
+pre.code .literal.string.symbol       { color: #B8860B }
+pre.code .name.builtin.pseudo         { color: #AA22FF }
+pre.code .name.variable               { color: #B8860B }


Property changes on: trunk/sandbox/stylesheets/pygments-long.css
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Added: trunk/sandbox/stylesheets/pygments-long.sty
===================================================================
--- trunk/sandbox/stylesheets/pygments-long.sty                        (rev 0)
+++ trunk/sandbox/stylesheets/pygments-long.sty2012-05-09 10:41:38 UTC (rev 7429)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,18 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/* example stylesheet for Docutils */
+
+/* :Author:    Günter Milde */
+/* :Copyright: © 2012 G. Milde */
+/* :License:   This stylesheet is placed in the public domain. */
+
+/* Syntax highlight rules for LaTeX documents generated with Docutils */
+/* using the ``--syntax-highlight=long`` option (new in v. 0.9). */
+
+/* This stylesheet implements a very basic style with only few rules. */
+
+\newcommand\DUrolecomment[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
+\newcommand\DUrolekeyword[1]{\textbf{#1}}
+\newcommand\DUrolename[1]{\textcolor[rgb]{0.00,0.25,0.82}{#1}}
+\newcommand\DUrolebuiltin[1]{\textbf{#1}}
+\newcommand\DUrolestring[1]{\textit{#1}}
+% \newcommand\DUroleoperator[1]{\textcolor[rgb]{0.72,0.53,0.04}{#1}}
+

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Docutils-checkins mailing list
Docutils-checkins&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-checkins
&lt;/pre&gt;</description>
    <dc:creator>milde&lt; at &gt;users.sourceforge.net</dc:creator>
    <dc:date>2012-05-09T10:41:38</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.cvs/7703">
    <title>SF.net SVN: docutils:[7428] trunk/sandbox/code-block-directive/tools/ makesty.py</title>
    <link>http://comments.gmane.org/gmane.text.docutils.cvs/7703</link>
    <description>&lt;pre&gt;Revision: 7428
          http://docutils.svn.sourceforge.net/docutils/?rev=7428&amp;amp;view=rev
Author:   milde
Date:     2012-05-09 10:32:30 +0000 (Wed, 09 May 2012)
Log Message:
-----------
Update skript to convert Pygments styles from CSS to LaTeX.

Bugfix: do not fail at lines without comment.
Support for digits in role names.
``\\\\providecommand`` instead of ``\\\\newcommand``.

Modified Paths:
--------------
    trunk/sandbox/code-block-directive/tools/makesty.py

Modified: trunk/sandbox/code-block-directive/tools/makesty.py
===================================================================
--- trunk/sandbox/code-block-directive/tools/makesty.py2012-05-06 19:10:43 UTC (rev 7427)
+++ trunk/sandbox/code-block-directive/tools/makesty.py2012-05-09 10:32:30 UTC (rev 7428)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,27 +1,37 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #! /usr/bin/env python
+# coding: utf8
 # Copyright: Raphael 'kena' Poss &amp;lt;r.c.poss&amp;lt; at &amp;gt;uva.nl&amp;gt;
 # this file is placed in the public domain.
+#
+# Convert a CSS stylesheet into one for Docutils' LaTeX output.
+#
+# Usage example::
+#
+#    pygmentize -S default -f html | python makesty.py &amp;gt;pygments-default.sty
+#
+# Versions:
+#
+# 2012-05-09: Günter Milde &amp;lt;milde&amp;lt; at &amp;gt;users.sf.net&amp;gt;:
+#             Bugfix: do not fail at lines without comment.
+#             Support for digits in role names.
+#             ``\providecommand`` instead of ``\newcommand``.
 
-# Use with: pygmentize -S default -f html | python makesty.py &amp;gt;pygments-DUroles.sty
-
 import sys
 import re
 
-d = re.compile(r'.*[0-9]')
+print '% Stylesheet for syntax highlight with Docutils'
+print '% Generated by makesty.py from a Pygments CSS style'
+print '% (output of `pygmentize -S &amp;lt;style&amp;gt; -f html`).'
+print
+print r'\RequirePackage{color}'
 
-print r'%% Stylesheet generated by %s' % sys.argv[0]
-print r'\usepackage{color}'
-
 cnt = 0
 for l in sys.stdin:
 
-    print "% " + l.split('*')[1]
+    if '/*' in l:
+        print "% " + l.split('*')[1]
     key = l.split(' ', 1)[0][1:]
 
-    if d.match(key) is not None:
-       print "%% Can't generate style for '%s' because 'DUrole%s' is not a valid macro id." % (key,key) 
-       continue
-
     s = '#1'
 
     if 'color:' in l:
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -30,7 +40,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
         g = float(int(col[2:4], 16)) / 255.
         b = float(int(col[4:6], 16)) / 255.
         s = r'\textcolor[rgb]{%.2f,%.2f,%.2f}{%s}' % (r, g, b, s)
-        
+
     if 'font-style: italic' in l:
         s = r'\textit{%s}' % s
     if 'font-weight: bold' in l:
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -41,13 +51,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
         r = float(int(col[0:2], 16)) / 255.
         g = float(int(col[2:4], 16)) / 255.
         b = float(int(col[4:6], 16)) / 255.
-        cn = 'ducolor%d' % cnt
+        cname = 'DUcolor%d' % cnt
         cnt += 1
-        print r'\definecolor{%s}{rgb}{%.2f,%.2f,%.2f}' % (cn, r, g, b)
-        s = r'\colorbox{%s}{%s}' % (cn, s)
-        
-    print r'\newcommand\DUrole%s[1]{%s}' % (key, s)
+        print r'\definecolor{%s}{rgb}{%.2f,%.2f,%.2f}' % (cname, r, g, b)
+        s = r'\colorbox{%s}{%s}' % (cname, s)
 
-# These seem to be special
-print r'\newcommand\DUrolep[1]{#1}'
-
+    if re.match(r'.*[0-9]', key) is None:
+        print r'\providecommand*\DUrole%s[1]{%s}' % (key, s)
+    else:
+        print r'\providecommand\csname DUrole%s\endcsname[1]{%s}' % (key, s)

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Docutils-checkins mailing list
Docutils-checkins&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-checkins
&lt;/pre&gt;</description>
    <dc:creator>milde&lt; at &gt;users.sourceforge.net</dc:creator>
    <dc:date>2012-05-09T10:32:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.cvs/7702">
    <title>SF.net SVN: docutils:[7427]trunk/sandbox/code-block-directive/tools</title>
    <link>http://comments.gmane.org/gmane.text.docutils.cvs/7702</link>
    <description>&lt;pre&gt;Revision: 7427
          http://docutils.svn.sourceforge.net/docutils/?rev=7427&amp;amp;view=rev
Author:   milde
Date:     2012-05-06 19:10:43 +0000 (Sun, 06 May 2012)
Log Message:
-----------
Stylesheet converter and example stylesheet for syntax highlight with LaTeX.

Added Paths:
-----------
    trunk/sandbox/code-block-directive/tools/makesty.py
    trunk/sandbox/code-block-directive/tools/pygments-docutilsroles.sty

Added: trunk/sandbox/code-block-directive/tools/makesty.py
===================================================================
--- trunk/sandbox/code-block-directive/tools/makesty.py                        (rev 0)
+++ trunk/sandbox/code-block-directive/tools/makesty.py2012-05-06 19:10:43 UTC (rev 7427)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,53 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#! /usr/bin/env python
+# Copyright: Raphael 'kena' Poss &amp;lt;r.c.poss&amp;lt; at &amp;gt;uva.nl&amp;gt;
+# this file is placed in the public domain.
+
+# Use with: pygmentize -S default -f html | python makesty.py &amp;gt;pygments-DUroles.sty
+
+import sys
+import re
+
+d = re.compile(r'.*[0-9]')
+
+print r'%% Stylesheet generated by %s' % sys.argv[0]
+print r'\usepackage{color}'
+
+cnt = 0
+for l in sys.stdin:
+
+    print "% " + l.split('*')[1]
+    key = l.split(' ', 1)[0][1:]
+
+    if d.match(key) is not None:
+       print "%% Can't generate style for '%s' because 'DUrole%s' is not a valid macro id." % (key,key) 
+       continue
+
+    s = '#1'
+
+    if 'color:' in l:
+        col = l.split('#',1)[1][:6]
+        r = float(int(col[0:2], 16)) / 255.
+        g = float(int(col[2:4], 16)) / 255.
+        b = float(int(col[4:6], 16)) / 255.
+        s = r'\textcolor[rgb]{%.2f,%.2f,%.2f}{%s}' % (r, g, b, s)
+        
+    if 'font-style: italic' in l:
+        s = r'\textit{%s}' % s
+    if 'font-weight: bold' in l:
+        s = r'\textbf{%s}' % s
+
+    if 'border:' in l:
+        col = l.split('#',1)[1][:6]
+        r = float(int(col[0:2], 16)) / 255.
+        g = float(int(col[2:4], 16)) / 255.
+        b = float(int(col[4:6], 16)) / 255.
+        cn = 'ducolor%d' % cnt
+        cnt += 1
+        print r'\definecolor{%s}{rgb}{%.2f,%.2f,%.2f}' % (cn, r, g, b)
+        s = r'\colorbox{%s}{%s}' % (cn, s)
+        
+    print r'\newcommand\DUrole%s[1]{%s}' % (key, s)
+
+# These seem to be special
+print r'\newcommand\DUrolep[1]{#1}'
+


Property changes on: trunk/sandbox/code-block-directive/tools/makesty.py
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Added: trunk/sandbox/code-block-directive/tools/pygments-docutilsroles.sty
===================================================================
--- trunk/sandbox/code-block-directive/tools/pygments-docutilsroles.sty                        (rev 0)
+++ trunk/sandbox/code-block-directive/tools/pygments-docutilsroles.sty2012-05-06 19:10:43 UTC (rev 7427)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,122 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+% Stylesheet generated by makesty.py
+\usepackage{color}
+%  Comment 
+\newcommand\docutilsrolec[1]{\textit{\textcolor[rgb]{0.25,0.50,0.50}{#1}}}
+%  Error 
+\definecolor{ducolor0}{rgb}{1.00,0.00,0.00}
+\newcommand\docutilsroleerr[1]{\colorbox{ducolor0}{#1}}
+%  Keyword 
+\newcommand\docutilsrolek[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}}
+%  Operator 
+\newcommand\docutilsroleo[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
+%  Comment.Multiline 
+\newcommand\docutilsrolecm[1]{\textit{\textcolor[rgb]{0.25,0.50,0.50}{#1}}}
+%  Comment.Preproc 
+\newcommand\docutilsrolecp[1]{\textcolor[rgb]{0.74,0.48,0.00}{#1}}
+%  Comment.Single 
+% Can't generate style for 'c1' because 'docutilsrolec1' is not a valid macro id.
+%  Comment.Special 
+\newcommand\docutilsrolecs[1]{\textit{\textcolor[rgb]{0.25,0.50,0.50}{#1}}}
+%  Generic.Deleted 
+\newcommand\docutilsrolegd[1]{\textcolor[rgb]{0.63,0.00,0.00}{#1}}
+%  Generic.Emph 
+\newcommand\docutilsrolege[1]{\textit{#1}}
+%  Generic.Error 
+\newcommand\docutilsrolegr[1]{\textcolor[rgb]{1.00,0.00,0.00}{#1}}
+%  Generic.Heading 
+\newcommand\docutilsrolegh[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.50}{#1}}}
+%  Generic.Inserted 
+\newcommand\docutilsrolegi[1]{\textcolor[rgb]{0.00,0.63,0.00}{#1}}
+%  Generic.Output 
+\newcommand\docutilsrolego[1]{\textcolor[rgb]{0.50,0.50,0.50}{#1}}
+%  Generic.Prompt 
+\newcommand\docutilsrolegp[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.50}{#1}}}
+%  Generic.Strong 
+\newcommand\docutilsrolegs[1]{\textbf{#1}}
+%  Generic.Subheading 
+\newcommand\docutilsrolegu[1]{\textbf{\textcolor[rgb]{0.50,0.00,0.50}{#1}}}
+%  Generic.Traceback 
+\newcommand\docutilsrolegt[1]{\textcolor[rgb]{0.00,0.25,0.82}{#1}}
+%  Keyword.Constant 
+\newcommand\docutilsrolekc[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}}
+%  Keyword.Declaration 
+\newcommand\docutilsrolekd[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}}
+%  Keyword.Pseudo 
+\newcommand\docutilsrolekp[1]{\textcolor[rgb]{0.00,0.50,0.00}{#1}}
+%  Keyword.Reserved 
+\newcommand\docutilsrolekr[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}}
+%  Keyword.Type 
+\newcommand\docutilsrolekt[1]{\textcolor[rgb]{0.69,0.00,0.25}{#1}}
+%  Literal.Number 
+\newcommand\docutilsrolem[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
+%  Literal.String 
+\newcommand\docutilsroles[1]{\textcolor[rgb]{0.73,0.13,0.13}{#1}}
+%  Name.Attribute 
+\newcommand\docutilsrolena[1]{\textcolor[rgb]{0.49,0.56,0.16}{#1}}
+%  Name.Builtin 
+\newcommand\docutilsrolenb[1]{\textcolor[rgb]{0.00,0.50,0.00}{#1}}
+%  Name.Class 
+\newcommand\docutilsrolenc[1]{\textbf{\textcolor[rgb]{0.00,0.00,1.00}{#1}}}
+%  Name.Constant 
+\newcommand\docutilsroleno[1]{\textcolor[rgb]{0.53,0.00,0.00}{#1}}
+%  Name.Decorator 
+\newcommand\docutilsrolend[1]{\textcolor[rgb]{0.67,0.13,1.00}{#1}}
+%  Name.Entity 
+\newcommand\docutilsroleni[1]{\textbf{\textcolor[rgb]{0.60,0.60,0.60}{#1}}}
+%  Name.Exception 
+\newcommand\docutilsrolene[1]{\textbf{\textcolor[rgb]{0.82,0.25,0.23}{#1}}}
+%  Name.Function 
+\newcommand\docutilsrolenf[1]{\textcolor[rgb]{0.00,0.00,1.00}{#1}}
+%  Name.Label 
+\newcommand\docutilsrolenl[1]{\textcolor[rgb]{0.63,0.63,0.00}{#1}}
+%  Name.Namespace 
+\newcommand\docutilsrolenn[1]{\textbf{\textcolor[rgb]{0.00,0.00,1.00}{#1}}}
+%  Name.Tag 
+\newcommand\docutilsrolent[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}}
+%  Name.Variable 
+\newcommand\docutilsrolenv[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}}
+%  Operator.Word 
+\newcommand\docutilsroleow[1]{\textbf{\textcolor[rgb]{0.67,0.13,1.00}{#1}}}
+%  Text.Whitespace 
+\newcommand\docutilsrolew[1]{\textcolor[rgb]{0.73,0.73,0.73}{#1}}
+%  Literal.Number.Float 
+\newcommand\docutilsrolemf[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
+%  Literal.Number.Hex 
+\newcommand\docutilsrolemh[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
+%  Literal.Number.Integer 
+\newcommand\docutilsrolemi[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
+%  Literal.Number.Oct 
+\newcommand\docutilsrolemo[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
+%  Literal.String.Backtick 
+\newcommand\docutilsrolesb[1]{\textcolor[rgb]{0.73,0.13,0.13}{#1}}
+%  Literal.String.Char 
+\newcommand\docutilsrolesc[1]{\textcolor[rgb]{0.73,0.13,0.13}{#1}}
+%  Literal.String.Doc 
+\newcommand\docutilsrolesd[1]{\textit{\textcolor[rgb]{0.73,0.13,0.13}{#1}}}
+%  Literal.String.Double 
+% Can't generate style for 's2' because 'docutilsroles2' is not a valid macro id.
+%  Literal.String.Escape 
+\newcommand\docutilsrolese[1]{\textbf{\textcolor[rgb]{0.73,0.40,0.13}{#1}}}
+%  Literal.String.Heredoc 
+\newcommand\docutilsrolesh[1]{\textcolor[rgb]{0.73,0.13,0.13}{#1}}
+%  Literal.String.Interpol 
+\newcommand\docutilsrolesi[1]{\textbf{\textcolor[rgb]{0.73,0.40,0.53}{#1}}}
+%  Literal.String.Other 
+\newcommand\docutilsrolesx[1]{\textcolor[rgb]{0.00,0.50,0.00}{#1}}
+%  Literal.String.Regex 
+\newcommand\docutilsrolesr[1]{\textcolor[rgb]{0.73,0.40,0.53}{#1}}
+%  Literal.String.Single 
+% Can't generate style for 's1' because 'docutilsroles1' is not a valid macro id.
+%  Literal.String.Symbol 
+\newcommand\docutilsroless[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}}
+%  Name.Builtin.Pseudo 
+\newcommand\docutilsrolebp[1]{\textcolor[rgb]{0.00,0.50,0.00}{#1}}
+%  Name.Variable.Class 
+\newcommand\docutilsrolevc[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}}
+%  Name.Variable.Global 
+\newcommand\docutilsrolevg[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}}
+%  Name.Variable.Instance 
+\newcommand\docutilsrolevi[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}}
+%  Literal.Number.Integer.Long 
+\newcommand\docutilsroleil[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
+\newcommand\docutilsrolep[1]{#1}

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>milde&lt; at &gt;users.sourceforge.net</dc:creator>
    <dc:date>2012-05-06T19:10:44</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.cvs/7701">
    <title>SF.net SVN: docutils:[7426]trunk/sandbox/grubert/rllicense.txt</title>
    <link>http://comments.gmane.org/gmane.text.docutils.cvs/7701</link>
    <description>&lt;pre&gt;Revision: 7426
          http://docutils.svn.sourceforge.net/docutils/?rev=7426&amp;amp;view=rev
Author:   grubert
Date:     2012-05-05 11:23:03 +0000 (Sat, 05 May 2012)
Log Message:
-----------
remove reportlab license

Removed Paths:
-------------
    trunk/sandbox/grubert/rllicense.txt

Deleted: trunk/sandbox/grubert/rllicense.txt
===================================================================
--- trunk/sandbox/grubert/rllicense.txt2012-05-03 16:30:55 UTC (rev 7425)
+++ trunk/sandbox/grubert/rllicense.txt2012-05-05 11:23:03 UTC (rev 7426)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,29 +0,0 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
-#####################################################################################
-#
-#Copyright (c) 2000-2001, ReportLab Inc.
-#All rights reserved.
-#
-#Redistribution and use in source and binary forms, with or without modification,
-#are permitted provided that the following conditions are met:
-#
-#*Redistributions of source code must retain the above copyright notice,
-#this list of conditions and the following disclaimer. 
-#*Redistributions in binary form must reproduce the above copyright notice,
-#this list of conditions and the following disclaimer in the documentation
-#and/or other materials provided with the distribution. 
-#*Neither the name of the company nor the names of its contributors may be
-#used to endorse or promote products derived from this software without
-#specific prior written permission. 
-#
-#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-#ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-#WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-#IN NO EVENT SHALL THE OFFICERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-#INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-#TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-#OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-#IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
-#IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-#SUCH DAMAGE.
-#
-#####################################################################################

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>grubert&lt; at &gt;users.sourceforge.net</dc:creator>
    <dc:date>2012-05-05T11:23:03</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.cvs/7700">
    <title>SF.net SVN: docutils:[7425]trunk/docutils/RELEASE-NOTES.txt</title>
    <link>http://comments.gmane.org/gmane.text.docutils.cvs/7700</link>
    <description>&lt;pre&gt;Revision: 7425
          http://docutils.svn.sourceforge.net/docutils/?rev=7425&amp;amp;view=rev
Author:   grubert
Date:     2012-05-03 16:30:55 +0000 (Thu, 03 May 2012)
Log Message:
-----------
roadmap: end python2.3 support

Modified Paths:
--------------
    trunk/docutils/RELEASE-NOTES.txt

Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt2012-05-03 11:26:37 UTC (rev 7424)
+++ trunk/docutils/RELEASE-NOTES.txt2012-05-03 16:30:55 UTC (rev 7425)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -42,6 +42,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
                is called with `handle_io_errors`,
   :0.10 + n+1: remove the `handle_io_errors` option.
 
+* end of python2.3 support with 0.10, most likely.
 
 Changes Since 0.9
 =================

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>grubert&lt; at &gt;users.sourceforge.net</dc:creator>
    <dc:date>2012-05-03T16:30:56</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.cvs/7699">
    <title>SF.net SVN: docutils:[7424]trunk/docutils/docutils/math/math2html.py</title>
    <link>http://comments.gmane.org/gmane.text.docutils.cvs/7699</link>
    <description>&lt;pre&gt;Revision: 7424
          http://docutils.svn.sourceforge.net/docutils/?rev=7424&amp;amp;view=rev
Author:   milde
Date:     2012-05-03 11:26:37 +0000 (Thu, 03 May 2012)
Log Message:
-----------
math2html: Fix writing to sys.stdout/sys.stderr under Py3k.

Modified Paths:
--------------
    trunk/docutils/docutils/math/math2html.py

Modified: trunk/docutils/docutils/math/math2html.py
===================================================================
--- trunk/docutils/docutils/math/math2html.py2012-05-03 11:01:54 UTC (rev 7423)
+++ trunk/docutils/docutils/math/math2html.py2012-05-03 11:26:37 UTC (rev 7424)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -70,7 +70,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
   def show(cls, message, channel):
     "Show a message out of a channel"
-    message = message.encode('utf-8')
+    if sys.version_info &amp;lt; (3,0):
+      message = message.encode('utf-8')
     channel.write(message + '\n')
 
   debug = classmethod(debug)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1701,7 +1702,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     "Write a string"
     if not self.file:
       self.file = codecs.open(self.filename, 'w', "utf-8")
-    if self.file == sys.stdout:
+    if self.file == sys.stdout and sys.version_info &amp;lt; (3,0):
       string = string.encode('utf-8')
     self.file.write(string)
 

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>milde&lt; at &gt;users.sourceforge.net</dc:creator>
    <dc:date>2012-05-03T11:26:37</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.cvs/7698">
    <title>SF.net SVN: docutils:[7423] trunk/docutils</title>
    <link>http://comments.gmane.org/gmane.text.docutils.cvs/7698</link>
    <description>&lt;pre&gt;Revision: 7423
          http://docutils.svn.sourceforge.net/docutils/?rev=7423&amp;amp;view=rev
Author:   milde
Date:     2012-05-03 11:01:54 +0000 (Thu, 03 May 2012)
Log Message:
-----------
Documentation update.

Modified Paths:
--------------
    trunk/docutils/RELEASE-NOTES.txt
    trunk/docutils/docutils/error_reporting.py

Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt2012-05-03 10:55:30 UTC (rev 7422)
+++ trunk/docutils/RELEASE-NOTES.txt2012-05-03 11:01:54 UTC (rev 7423)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -34,12 +34,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
   Roadmap:
 
   :0.10: change of default behaviour to the equivalent of
-         ``handle_io_errors=False`` and deprecation of the
-         `handle_io_errors` option,
-  :0.11: deprecation warning to stderr if FileInput/FileOutput
-         is called with `handle_io_errors`,
-  :0.12: ignore ``handle_io_errors=True``,
-  :0.13: remove the `handle_io_errors` option.
+         ``handle_io_errors=False``,
+         ignore and deprecate the `handle_io_errors` option.
+         (allows us to clean up Docutils code and remove the error handling
+          code from the FileInput/FileOutput classes)
+  :0.10 + n:   deprecation warning to stderr if FileInput/FileOutput
+               is called with `handle_io_errors`,
+  :0.10 + n+1: remove the `handle_io_errors` option.
 
 
 Changes Since 0.9

Modified: trunk/docutils/docutils/error_reporting.py
===================================================================
--- trunk/docutils/docutils/error_reporting.py2012-05-03 10:55:30 UTC (rev 7422)
+++ trunk/docutils/docutils/error_reporting.py2012-05-03 11:01:54 UTC (rev 7423)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -140,11 +140,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
                  decoding_errors='replace'):
         """
         :Parameters:
-            - `stream`: a file-like object (which is written to),
-                        a string (opended as a file),
-                        `None` (bind to `sys.stderr`; default).
-                        If evaluating to `False` (but not `None`),
-                        write() requests are ignored.
+            - `stream`: a file-like object,
+                        a string (path to a file),
+                        `None` (write to `sys.stderr`, default), or
+                        evaluating to `False` (write() requests are ignored).
             - `encoding`: `stream` text encoding. Guessed if None.
             - `encoding_errors`: how to treat encoding errors.
         """

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>milde&lt; at &gt;users.sourceforge.net</dc:creator>
    <dc:date>2012-05-03T11:01:54</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.cvs/7697">
    <title>SF.net SVN: docutils:[7422] trunk/docutils</title>
    <link>http://comments.gmane.org/gmane.text.docutils.cvs/7697</link>
    <description>&lt;pre&gt;Revision: 7422
          http://docutils.svn.sourceforge.net/docutils/?rev=7422&amp;amp;view=rev
Author:   milde
Date:     2012-05-03 10:55:30 +0000 (Thu, 03 May 2012)
Log Message:
-----------
odtwriter: import the PIL Image module via ``import PIL``.

* Unify the PIL.Image import (images.py and the HTML writer changed already
  in Dec 2011, Pygments in May 2010). 

* starting with PIL 1.2, "PIL lives in the PIL namespace only"
  (http://mail.python.org/pipermail/image-sig/2011-January/006650.html)
 

Modified Paths:
--------------
    trunk/docutils/HISTORY.txt
    trunk/docutils/docutils/writers/odf_odt/__init__.py

Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt2012-05-03 06:37:16 UTC (rev 7421)
+++ trunk/docutils/HISTORY.txt2012-05-03 10:55:30 UTC (rev 7422)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -25,8 +25,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
   - New reStructuredText "code" role and directive and "code" option
     of the "include" directive with syntax highlighting by Pygments_.
   - Fix parse_option_marker for option arguments containing ``=``.
+  - Fix [ 2993756 ]: import Python Imaging Library's Image module
+    via ``import PIL`` as starting with PIL 1.2,
+    "PIL lives in the PIL namespace only" (announcement__).
 
 .. _Pygments: http://pygments.org/
+__ http://mail.python.org/pipermail/image-sig/2011-January/006650.html
 
 * setup.py
 

Modified: trunk/docutils/docutils/writers/odf_odt/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/odf_odt/__init__.py2012-05-03 06:37:16 UTC (rev 7421)
+++ trunk/docutils/docutils/writers/odf_odt/__init__.py2012-05-03 10:55:30 UTC (rev 7422)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -64,12 +64,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 except ImportError, exp:
     pygments = None
 
-#
-# Is the PIL imaging library installed?
-try:
-    import Image
-except ImportError, exp:
-    Image = None
+try: # check for the Python Imaging Library
+    import PIL
+except ImportError:
+    try:  # sometimes PIL modules are put in PYTHONPATH's root
+        import Image
+        class PIL(object): pass  # dummy wrapper
+        PIL.Image = Image
+    except ImportError:
+        PIL = None
 
 ## import warnings
 ## warnings.warn('importing IPShellEmbed', UserWarning)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2123,9 +2126,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
         height = self.get_image_width_height(node, 'height')
 
         dpi = (72, 72)
-        if Image is not None and source in self.image_dict:
+        if PIL is not None and source in self.image_dict:
             filename, destination = self.image_dict[source]
-            imageobj = Image.open(filename, 'r')
+            imageobj = PIL.Image.open(filename, 'r')
             dpi = imageobj.info.get('dpi', dpi)
             # dpi information can be (xdpi, ydpi) or xydpi
             try: iter(dpi)

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>milde&lt; at &gt;users.sourceforge.net</dc:creator>
    <dc:date>2012-05-03T10:55:30</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.cvs/7696">
    <title>SF.net SVN: docutils:[7421]trunk/docutils/setup.py</title>
    <link>http://comments.gmane.org/gmane.text.docutils.cvs/7696</link>
    <description>&lt;pre&gt;Revision: 7421
          http://docutils.svn.sourceforge.net/docutils/?rev=7421&amp;amp;view=rev
Author:   grubert
Date:     2012-05-03 06:37:16 +0000 (Thu, 03 May 2012)
Log Message:
-----------
pypi natural language entries changed (lithuanian vanished)

Modified Paths:
--------------
    trunk/docutils/setup.py

Modified: trunk/docutils/setup.py
===================================================================
--- trunk/docutils/setup.py2012-05-02 19:27:09 UTC (rev 7420)
+++ trunk/docutils/setup.py2012-05-03 06:37:16 UTC (rev 7421)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -193,6 +193,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     'Natural Language :: English',      # main/default language, keep first
     'Natural Language :: Afrikaans',
     'Natural Language :: Catalan',
+    'Natural Language :: Chinese (Simplified)',
+    'Natural Language :: Chinese (Traditional)',
     'Natural Language :: Czech',
     'Natural Language :: Dutch',
     'Natural Language :: Esperanto',
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -203,16 +205,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     'Natural Language :: Italian',
     'Natural Language :: Japanese',
     'Natural Language :: Polish',
+    'Natural Language :: Portuguese (Brazilian)',
     'Natural Language :: Russian',
     'Natural Language :: Slovak',
     'Natural Language :: Spanish',
     'Natural Language :: Swedish',
     ]
 # BUG pypi did not like fllowing languages
-#   'Natural Language :: Brazilian Portuguese',
 #   'Natural Language :: Lithuanian',
-#   'Natural Language :: Simplified Chinese ',
-#   'Natural Language :: Traditional Chinese ',
 """Trove classifiers for the Distutils "register" command;
 Python 2.3 and up."""
 

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>grubert&lt; at &gt;users.sourceforge.net</dc:creator>
    <dc:date>2012-05-03T06:37:16</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.cvs/7695">
    <title>SF.net SVN: docutils:[7420]trunk/sandbox/infrastructure/release.sh</title>
    <link>http://comments.gmane.org/gmane.text.docutils.cvs/7695</link>
    <description>&lt;pre&gt;Revision: 7420
          http://docutils.svn.sourceforge.net/docutils/?rev=7420&amp;amp;view=rev
Author:   grubert
Date:     2012-05-02 19:27:09 +0000 (Wed, 02 May 2012)
Log Message:
-----------
change frs path

Modified Paths:
--------------
    trunk/sandbox/infrastructure/release.sh

Modified: trunk/sandbox/infrastructure/release.sh
===================================================================
--- trunk/sandbox/infrastructure/release.sh2012-05-02 19:25:12 UTC (rev 7419)
+++ trunk/sandbox/infrastructure/release.sh2012-05-02 19:27:09 UTC (rev 7420)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -433,7 +433,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     echo 'Downloading the tarball to verify its integrity.'
     while true; do
     # BUG path is wrong. project admin filemanager shows md5sum
-        confirm wget http://osdn.dl.sourceforge.net/sourceforge/docutils/"$tarball"
+        confirm wget http://sourceforge.net/projects/docutils/files/"$tarball"
         echo 'Was the download successful?'
         echo 'If yes, press enter to continue, otherwise enter anything to repeat'
         echo '(it is possible that the file will show up in a few minutes).'

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>grubert&lt; at &gt;users.sourceforge.net</dc:creator>
    <dc:date>2012-05-02T19:27:09</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.cvs/7694">
    <title>SF.net SVN: docutils:[7419] trunk/web/index.txt</title>
    <link>http://comments.gmane.org/gmane.text.docutils.cvs/7694</link>
    <description>&lt;pre&gt;Revision: 7419
          http://docutils.svn.sourceforge.net/docutils/?rev=7419&amp;amp;view=rev
Author:   grubert
Date:     2012-05-02 19:25:12 +0000 (Wed, 02 May 2012)
Log Message:
-----------
0.9

Modified Paths:
--------------
    trunk/web/index.txt

Modified: trunk/web/index.txt
===================================================================
--- trunk/web/index.txt2012-05-02 19:23:53 UTC (rev 7418)
+++ trunk/web/index.txt2012-05-02 19:25:12 UTC (rev 7419)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -59,13 +59,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 repository`_. The snapshots usually contain *more features* and *fewer bugs*
 than the "official" releases |---| they're not only for developers!
 
-The latest **release package** is `docutils-0.8.1.tgz`__.  It was
-released on 2011-07-08 and is mostly intended for distributors.  See
+The latest **release package** is `docutils-0.9.tgz`__.  It was
+released on 2012-05-02 and is mostly intended for distributors.  See
 the `release notes`_ for a list of changes since the previous release
-(0.7).
+(0.8.1).
 
-__ http://prdownloads.sourceforge.net/docutils/docutils-0.8.1.tar.gz?download
-.. _release notes: RELEASE-NOTES.html#release-0-8-1-2011-08-30
+__ http://prdownloads.sourceforge.net/docutils/docutils-0.9.tar.gz?download
+.. _release notes: RELEASE-NOTES.html#release-0-9-2012-05-02
 
 The Sandbox_ contains experimental, contributed code. You can download a
 complete `snapshot of the Sandbox`_ or `browse the Sandbox`_ to download a

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>grubert&lt; at &gt;users.sourceforge.net</dc:creator>
    <dc:date>2012-05-02T19:25:12</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.cvs/7693">
    <title>SF.net SVN: docutils:[7418] trunk/docutils</title>
    <link>http://comments.gmane.org/gmane.text.docutils.cvs/7693</link>
    <description>&lt;pre&gt;Revision: 7418
          http://docutils.svn.sourceforge.net/docutils/?rev=7418&amp;amp;view=rev
Author:   grubert
Date:     2012-05-02 19:23:53 +0000 (Wed, 02 May 2012)
Log Message:
-----------
Release 0.9: set version number to 0.10

Modified Paths:
--------------
    trunk/docutils/docutils/__init__.py
    trunk/docutils/setup.py
    trunk/docutils/test/functional/expected/compact_lists.html
    trunk/docutils/test/functional/expected/dangerous.html
    trunk/docutils/test/functional/expected/field_name_limit.html
    trunk/docutils/test/functional/expected/math_output_html.html
    trunk/docutils/test/functional/expected/math_output_latex.html
    trunk/docutils/test/functional/expected/math_output_mathjax.html
    trunk/docutils/test/functional/expected/math_output_mathml.xhtml
    trunk/docutils/test/functional/expected/misc_rst_html4css1.html
    trunk/docutils/test/functional/expected/pep_html.html
    trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
    trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
    trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
    trunk/docutils/test/functional/expected/stylesheet_path_html4css1.html

Modified: trunk/docutils/docutils/__init__.py
===================================================================
--- trunk/docutils/docutils/__init__.py2012-05-02 19:19:41 UTC (rev 7417)
+++ trunk/docutils/docutils/__init__.py2012-05-02 19:23:53 UTC (rev 7418)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -49,7 +49,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 __docformat__ = 'reStructuredText'
 
-__version__ = '0.9'
+__version__ = '0.10'
 """``major.minor.micro`` version number.  The micro number is bumped for API
 changes, for new functionality, and for interim project releases.  The minor
 number is bumped whenever there is a significant project release.  The major

Modified: trunk/docutils/setup.py
===================================================================
--- trunk/docutils/setup.py2012-05-02 19:19:41 UTC (rev 7417)
+++ trunk/docutils/setup.py2012-05-02 19:23:53 UTC (rev 7418)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -115,7 +115,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 input Docutils supports reStructuredText, an easy-to-read,
 what-you-see-is-what-you-get plaintext markup syntax.""", # wrap at col 60
     'url': 'http://docutils.sourceforge.net/',
-    'version': '0.9',
+    'version': '0.10',
     'author': 'David Goodger',
     'author_email': 'goodger&amp;lt; at &amp;gt;python.org',
     'license': 'public domain, Python, 2-Clause BSD, GPL 3 (see COPYING.txt)',

Modified: trunk/docutils/test/functional/expected/compact_lists.html
===================================================================
--- trunk/docutils/test/functional/expected/compact_lists.html2012-05-02 19:19:41 UTC (rev 7417)
+++ trunk/docutils/test/functional/expected/compact_lists.html2012-05-02 19:23:53 UTC (rev 7418)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3,7 +3,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 &amp;lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&amp;gt;
 &amp;lt;head&amp;gt;
 &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&amp;gt;
-&amp;lt;meta name="generator" content="Docutils 0.9: http://docutils.sourceforge.net/" /&amp;gt;
+&amp;lt;meta name="generator" content="Docutils 0.10: http://docutils.sourceforge.net/" /&amp;gt;
 &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;
 &amp;lt;link rel="stylesheet" href="../../../docutils/writers/html4css1/html4css1.css" type="text/css" /&amp;gt;
 &amp;lt;/head&amp;gt;

Modified: trunk/docutils/test/functional/expected/dangerous.html
===================================================================
--- trunk/docutils/test/functional/expected/dangerous.html2012-05-02 19:19:41 UTC (rev 7417)
+++ trunk/docutils/test/functional/expected/dangerous.html2012-05-02 19:23:53 UTC (rev 7418)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3,7 +3,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 &amp;lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&amp;gt;
 &amp;lt;head&amp;gt;
 &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&amp;gt;
-&amp;lt;meta name="generator" content="Docutils 0.9: http://docutils.sourceforge.net/" /&amp;gt;
+&amp;lt;meta name="generator" content="Docutils 0.10: http://docutils.sourceforge.net/" /&amp;gt;
 &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;
 &amp;lt;link rel="stylesheet" href="../../../docutils/writers/html4css1/html4css1.css" type="text/css" /&amp;gt;
 &amp;lt;/head&amp;gt;

Modified: trunk/docutils/test/functional/expected/field_name_limit.html
===================================================================
--- trunk/docutils/test/functional/expected/field_name_limit.html2012-05-02 19:19:41 UTC (rev 7417)
+++ trunk/docutils/test/functional/expected/field_name_limit.html2012-05-02 19:23:53 UTC (rev 7418)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3,7 +3,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 &amp;lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&amp;gt;
 &amp;lt;head&amp;gt;
 &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&amp;gt;
-&amp;lt;meta name="generator" content="Docutils 0.9: http://docutils.sourceforge.net/" /&amp;gt;
+&amp;lt;meta name="generator" content="Docutils 0.10: http://docutils.sourceforge.net/" /&amp;gt;
 &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;
 &amp;lt;link rel="stylesheet" href="../../../docutils/writers/html4css1/html4css1.css" type="text/css" /&amp;gt;
 &amp;lt;/head&amp;gt;

Modified: trunk/docutils/test/functional/expected/math_output_html.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_html.html2012-05-02 19:19:41 UTC (rev 7417)
+++ trunk/docutils/test/functional/expected/math_output_html.html2012-05-02 19:23:53 UTC (rev 7418)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3,7 +3,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 &amp;lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&amp;gt;
 &amp;lt;head&amp;gt;
 &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&amp;gt;
-&amp;lt;meta name="generator" content="Docutils 0.9: http://docutils.sourceforge.net/" /&amp;gt;
+&amp;lt;meta name="generator" content="Docutils 0.10: http://docutils.sourceforge.net/" /&amp;gt;
 &amp;lt;title&amp;gt;Mathematics&amp;lt;/title&amp;gt;
 &amp;lt;link rel="stylesheet" href="../../../docutils/writers/html4css1/html4css1.css" type="text/css" /&amp;gt;
 &amp;lt;link rel="stylesheet" href="../../../docutils/writers/html4css1/math.css" type="text/css" /&amp;gt;

Modified: trunk/docutils/test/functional/expected/math_output_latex.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_latex.html2012-05-02 19:19:41 UTC (rev 7417)
+++ trunk/docutils/test/functional/expected/math_output_latex.html2012-05-02 19:23:53 UTC (rev 7418)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3,7 +3,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 &amp;lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&amp;gt;
 &amp;lt;head&amp;gt;
 &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&amp;gt;
-&amp;lt;meta name="generator" content="Docutils 0.9: http://docutils.sourceforge.net/" /&amp;gt;
+&amp;lt;meta name="generator" content="Docutils 0.10: http://docutils.sourceforge.net/" /&amp;gt;
 &amp;lt;title&amp;gt;Mathematics&amp;lt;/title&amp;gt;
 &amp;lt;link rel="stylesheet" href="../../../docutils/writers/html4css1/html4css1.css" type="text/css" /&amp;gt;
 &amp;lt;/head&amp;gt;

Modified: trunk/docutils/test/functional/expected/math_output_mathjax.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathjax.html2012-05-02 19:19:41 UTC (rev 7417)
+++ trunk/docutils/test/functional/expected/math_output_mathjax.html2012-05-02 19:23:53 UTC (rev 7418)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3,7 +3,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 &amp;lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&amp;gt;
 &amp;lt;head&amp;gt;
 &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&amp;gt;
-&amp;lt;meta name="generator" content="Docutils 0.9: http://docutils.sourceforge.net/" /&amp;gt;
+&amp;lt;meta name="generator" content="Docutils 0.10: http://docutils.sourceforge.net/" /&amp;gt;
 &amp;lt;title&amp;gt;Mathematics&amp;lt;/title&amp;gt;
 &amp;lt;script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"&amp;gt;&amp;lt;/script&amp;gt;
 &amp;lt;link rel="stylesheet" href="../../../docutils/writers/html4css1/html4css1.css" type="text/css" /&amp;gt;

Modified: trunk/docutils/test/functional/expected/math_output_mathml.xhtml
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathml.xhtml2012-05-02 19:19:41 UTC (rev 7417)
+++ trunk/docutils/test/functional/expected/math_output_mathml.xhtml2012-05-02 19:23:53 UTC (rev 7418)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3,7 +3,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 &amp;lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&amp;gt;
 &amp;lt;head&amp;gt;
 &amp;lt;meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /&amp;gt;
-&amp;lt;meta name="generator" content="Docutils 0.9: http://docutils.sourceforge.net/" /&amp;gt;
+&amp;lt;meta name="generator" content="Docutils 0.10: http://docutils.sourceforge.net/" /&amp;gt;
 &amp;lt;title&amp;gt;Mathematics&amp;lt;/title&amp;gt;
 &amp;lt;link rel="stylesheet" href="../../../docutils/writers/html4css1/html4css1.css" type="text/css" /&amp;gt;
 &amp;lt;/head&amp;gt;

Modified: trunk/docutils/test/functional/expected/misc_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html4css1.html2012-05-02 19:19:41 UTC (rev 7417)
+++ trunk/docutils/test/functional/expected/misc_rst_html4css1.html2012-05-02 19:23:53 UTC (rev 7418)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3,7 +3,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 &amp;lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&amp;gt;
 &amp;lt;head&amp;gt;
 &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&amp;gt;
-&amp;lt;meta name="generator" content="Docutils 0.9: http://docutils.sourceforge.net/" /&amp;gt;
+&amp;lt;meta name="generator" content="Docutils 0.10: http://docutils.sourceforge.net/" /&amp;gt;
 &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;
 &amp;lt;link rel="stylesheet" href="foo&amp;amp;amp;bar.css" type="text/css" /&amp;gt;
 &amp;lt;/head&amp;gt;

Modified: trunk/docutils/test/functional/expected/pep_html.html
===================================================================
--- trunk/docutils/test/functional/expected/pep_html.html2012-05-02 19:19:41 UTC (rev 7417)
+++ trunk/docutils/test/functional/expected/pep_html.html2012-05-02 19:23:53 UTC (rev 7418)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -8,7 +8,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 --&amp;gt;
 &amp;lt;head&amp;gt;
   &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&amp;gt;
-  &amp;lt;meta name="generator" content="Docutils 0.9: http://docutils.sourceforge.net/" /&amp;gt;
+  &amp;lt;meta name="generator" content="Docutils 0.10: http://docutils.sourceforge.net/" /&amp;gt;
   &amp;lt;title&amp;gt;PEP 100 -- Test PEP&amp;lt;/title&amp;gt;
   &amp;lt;link rel="stylesheet" href="../../../docutils/writers/pep_html/pep.css" type="text/css" /&amp;gt;
 &amp;lt;/head&amp;gt;

Modified: trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html4css1.html2012-05-02 19:19:41 UTC (rev 7417)
+++ trunk/docutils/test/functional/expected/standalone_rst_html4css1.html2012-05-02 19:23:53 UTC (rev 7418)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3,7 +3,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 &amp;lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&amp;gt;
 &amp;lt;head&amp;gt;
 &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&amp;gt;
-&amp;lt;meta name="generator" content="Docutils 0.9: http://docutils.sourceforge.net/" /&amp;gt;
+&amp;lt;meta name="generator" content="Docutils 0.10: http://docutils.sourceforge.net/" /&amp;gt;
 &amp;lt;title&amp;gt;reStructuredText Test Document&amp;lt;/title&amp;gt;
 &amp;lt;meta name="author" content="David Goodger" /&amp;gt;
 &amp;lt;meta name="authors" content="Me  Myself  I" /&amp;gt;

Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html2012-05-02 19:19:41 UTC (rev 7417)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html2012-05-02 19:23:53 UTC (rev 7418)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3,7 +3,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 &amp;lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&amp;gt;
 &amp;lt;head&amp;gt;
 &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&amp;gt;
-&amp;lt;meta name="generator" content="Docutils 0.9: http://docutils.sourceforge.net/" /&amp;gt;
+&amp;lt;meta name="generator" content="Docutils 0.10: http://docutils.sourceforge.net/" /&amp;gt;
 &amp;lt;meta name="version" content="S5 1.1" /&amp;gt;
 &amp;lt;title&amp;gt;Slide Shows&amp;lt;/title&amp;gt;
 &amp;lt;meta name="author" content="David Goodger" /&amp;gt;

Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html2012-05-02 19:19:41 UTC (rev 7417)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html2012-05-02 19:23:53 UTC (rev 7418)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3,7 +3,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 &amp;lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&amp;gt;
 &amp;lt;head&amp;gt;
 &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&amp;gt;
-&amp;lt;meta name="generator" content="Docutils 0.9: http://docutils.sourceforge.net/" /&amp;gt;
+&amp;lt;meta name="generator" content="Docutils 0.10: http://docutils.sourceforge.net/" /&amp;gt;
 &amp;lt;meta name="version" content="S5 1.1" /&amp;gt;
 &amp;lt;title&amp;gt;Slide Shows&amp;lt;/title&amp;gt;
 &amp;lt;meta name="author" content="David Goodger" /&amp;gt;

Modified: trunk/docutils/test/functional/expected/stylesheet_path_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/stylesheet_path_html4css1.html2012-05-02 19:19:41 UTC (rev 7417)
+++ trunk/docutils/test/functional/expected/stylesheet_path_html4css1.html2012-05-02 19:23:53 UTC (rev 7418)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3,7 +3,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 &amp;lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&amp;gt;
 &amp;lt;head&amp;gt;
 &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&amp;gt;
-&amp;lt;meta name="generator" content="Docutils 0.9: http://docutils.sourceforge.net/" /&amp;gt;
+&amp;lt;meta name="generator" content="Docutils 0.10: http://docutils.sourceforge.net/" /&amp;gt;
 &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;
 &amp;lt;link rel="stylesheet" href="../../data/ham.css" type="text/css" /&amp;gt;
 &amp;lt;link rel="stylesheet" href="missing.css" type="text/css" /&amp;gt;

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>grubert&lt; at &gt;users.sourceforge.net</dc:creator>
    <dc:date>2012-05-02T19:23:53</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.cvs/7692">
    <title>SF.net SVN: docutils:[7417] trunk/docutils</title>
    <link>http://comments.gmane.org/gmane.text.docutils.cvs/7692</link>
    <description>&lt;pre&gt;Revision: 7417
          http://docutils.svn.sourceforge.net/docutils/?rev=7417&amp;amp;view=rev
Author:   grubert
Date:     2012-05-02 19:19:41 +0000 (Wed, 02 May 2012)
Log Message:
-----------
Release 0.9: added empty "Changes Since 0.9" section

Modified Paths:
--------------
    trunk/docutils/HISTORY.txt
    trunk/docutils/RELEASE-NOTES.txt

Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt2012-05-02 19:19:12 UTC (rev 7416)
+++ trunk/docutils/HISTORY.txt2012-05-02 19:19:41 UTC (rev 7417)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -13,6 +13,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 .. contents::
 
+Changes Since 0.9
+=================
+
+
 Release 0.9 (2012-05-02)
 ========================
 

Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt2012-05-02 19:19:12 UTC (rev 7416)
+++ trunk/docutils/RELEASE-NOTES.txt2012-05-02 19:19:41 UTC (rev 7417)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -42,6 +42,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
   :0.13: remove the `handle_io_errors` option.
 
 
+Changes Since 0.9
+=================
+
+
 Release 0.9 (2012-05-02)
 =========================
 

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>grubert&lt; at &gt;users.sourceforge.net</dc:creator>
    <dc:date>2012-05-02T19:19:41</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.cvs/7691">
    <title>SF.net SVN: docutils:[7416]trunk/docutils/docutils/__init__.py</title>
    <link>http://comments.gmane.org/gmane.text.docutils.cvs/7691</link>
    <description>&lt;pre&gt;Revision: 7416
          http://docutils.svn.sourceforge.net/docutils/?rev=7416&amp;amp;view=rev
Author:   grubert
Date:     2012-05-02 19:19:12 +0000 (Wed, 02 May 2012)
Log Message:
-----------
Release 0.9: set __version_details__ to "repository"

Modified Paths:
--------------
    trunk/docutils/docutils/__init__.py

Modified: trunk/docutils/docutils/__init__.py
===================================================================
--- trunk/docutils/docutils/__init__.py2012-05-02 19:18:11 UTC (rev 7415)
+++ trunk/docutils/docutils/__init__.py2012-05-02 19:19:12 UTC (rev 7416)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -56,7 +56,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 number will be bumped when the project is feature-complete, and perhaps if
 there is a major change in the design."""
 
-__version_details__ = 'release'
+__version_details__ = 'repository'
 """Extra version details (e.g. 'snapshot 2005-05-29, r3410', 'repository',
 'release'), modified automatically &amp;amp; manually."""
 

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>grubert&lt; at &gt;users.sourceforge.net</dc:creator>
    <dc:date>2012-05-02T19:19:12</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.text.docutils.cvs">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.text.docutils.cvs</link>
  </textinput>
</rdf:RDF>

