[Python-modules-commits] r3629 - in /packages/python-docutils/trunk/debian: patches/15_emacs_debian_paths.dpatch patches/16_emacs_jit_lock.dpatch rsthelp2man.xsl unpep263.py
smcv-guest at users.alioth.debian.org
smcv-guest at users.alioth.debian.org
Fri Nov 16 11:56:17 UTC 2007
Author: smcv-guest
Date: Fri Nov 16 11:56:17 2007
New Revision: 3629
URL: http://svn.debian.org/wsvn/python-modules/?sc=1&rev=3629
Log:
Add missing files
Added:
packages/python-docutils/trunk/debian/patches/15_emacs_debian_paths.dpatch
packages/python-docutils/trunk/debian/patches/16_emacs_jit_lock.dpatch
packages/python-docutils/trunk/debian/rsthelp2man.xsl
packages/python-docutils/trunk/debian/unpep263.py
Added: packages/python-docutils/trunk/debian/patches/15_emacs_debian_paths.dpatch
URL: http://svn.debian.org/wsvn/python-modules/packages/python-docutils/trunk/debian/patches/15_emacs_debian_paths.dpatch?rev=3629&op=file
==============================================================================
--- packages/python-docutils/trunk/debian/patches/15_emacs_debian_paths.dpatch (added)
+++ packages/python-docutils/trunk/debian/patches/15_emacs_debian_paths.dpatch Fri Nov 16 11:56:17 2007
@@ -1,0 +1,72 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 15_emacs_debian_paths.dpatch by Simon McVittie <smcv at ianadd.pseudorandom.co.uk>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix rst.el to use the executables without .py extension.
+
+ at DPATCH@
+
+--- docutils-0.4/tools/editors/emacs/rst.el 2007-10-15 13:55:54.000000000 +0100
++++ docutils-0.4/tools/editors/emacs/rst.el 2007-10-15 14:21:19.000000000 +0100
+@@ -2641,11 +2641,11 @@
+ :version "21.1")
+
+ (defvar rst-compile-toolsets
+- '((html . ("rst2html.py" ".html" nil))
+- (latex . ("rst2latex.py" ".tex" nil))
+- (newlatex . ("rst2newlatex.py" ".tex" nil))
+- (pseudoxml . ("rst2pseudoxml.py" ".xml" nil))
+- (xml . ("rst2xml.py" ".xml" nil)))
++ '((html . ("rst2html" ".html" nil))
++ (latex . ("rst2latex" ".tex" nil))
++ (newlatex . ("rst2newlatex" ".tex" nil))
++ (pseudoxml . ("rst2pseudoxml" ".xml" nil))
++ (xml . ("rst2xml" ".xml" nil)))
+ "An association list of the toolset to a list of the (command to use,
+ extension of produced filename, options to the tool (nil or a
+ string)) to be used for converting the document.")
+@@ -2653,7 +2653,7 @@
+ ;; Note for Python programmers not familiar with association lists: you can set
+ ;; values in an alists like this, e.g. :
+ ;; (setcdr (assq 'html rst-compile-toolsets)
+-;; '("rst2html.py" ".htm" "--stylesheet=/docutils.css"))
++;; '("rst2html" ".htm" "--stylesheet=/docutils.css"))
+
+
+ (defvar rst-compile-primary-toolset 'html
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 15_emacs_debian_paths.dpatch by Simon McVittie <smcv at ianadd.pseudorandom.co.uk>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix rst.el to use the executables without .py extension.
+
+ at DPATCH@
+
+--- docutils-0.4/tools/editors/emacs/rst.el 2007-10-15 13:55:54.000000000 +0100
++++ docutils-0.4/tools/editors/emacs/rst.el 2007-10-15 14:21:19.000000000 +0100
+@@ -2641,11 +2641,11 @@
+ :version "21.1")
+
+ (defvar rst-compile-toolsets
+- '((html . ("rst2html.py" ".html" nil))
+- (latex . ("rst2latex.py" ".tex" nil))
+- (newlatex . ("rst2newlatex.py" ".tex" nil))
+- (pseudoxml . ("rst2pseudoxml.py" ".xml" nil))
+- (xml . ("rst2xml.py" ".xml" nil)))
++ '((html . ("rst2html" ".html" nil))
++ (latex . ("rst2latex" ".tex" nil))
++ (newlatex . ("rst2newlatex" ".tex" nil))
++ (pseudoxml . ("rst2pseudoxml" ".xml" nil))
++ (xml . ("rst2xml" ".xml" nil)))
+ "An association list of the toolset to a list of the (command to use,
+ extension of produced filename, options to the tool (nil or a
+ string)) to be used for converting the document.")
+@@ -2653,7 +2653,7 @@
+ ;; Note for Python programmers not familiar with association lists: you can set
+ ;; values in an alists like this, e.g. :
+ ;; (setcdr (assq 'html rst-compile-toolsets)
+-;; '("rst2html.py" ".htm" "--stylesheet=/docutils.css"))
++;; '("rst2html" ".htm" "--stylesheet=/docutils.css"))
+
+
+ (defvar rst-compile-primary-toolset 'html
Added: packages/python-docutils/trunk/debian/patches/16_emacs_jit_lock.dpatch
URL: http://svn.debian.org/wsvn/python-modules/packages/python-docutils/trunk/debian/patches/16_emacs_jit_lock.dpatch?rev=3629&op=file
==============================================================================
--- packages/python-docutils/trunk/debian/patches/16_emacs_jit_lock.dpatch (added)
+++ packages/python-docutils/trunk/debian/patches/16_emacs_jit_lock.dpatch Fri Nov 16 11:56:17 2007
@@ -1,0 +1,52 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 16_emacs_jit_lock.dpatch by Justin Mazzola Paluska <jmp at MIT.EDU>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix rst.el to use jit-lock (lazy-lock.el is obsoleted in emacs 22)
+
+ at DPATCH@
+
+--- docutils-0.4/tools/editors/emacs/rst.el~ 2007-04-09 15:04:06.000000000 -0400
++++ docutils-0.4/tools/editors/emacs/rst.el 2007-04-09 15:04:56.000000000 -0400
+@@ -2196,13 +2196,13 @@
+ ((or (not font-lock-support-mode) ;; No support mode set (but required)
+ (symbolp font-lock-support-mode)) ;; or a fixed mode for all
+ (setq font-lock-support-mode
+- (list (cons 'rst-mode (and rst-mode-lazy 'lazy-lock-mode))
++ (list (cons 'rst-mode (and rst-mode-lazy 'jit-lock-mode))
+ (cons t font-lock-support-mode))))
+ ((and (listp font-lock-support-mode)
+ (not (assoc 'rst-mode font-lock-support-mode)))
+ ;; A list of modes missing rst-mode
+ (setq font-lock-support-mode
+- (append '((cons 'rst-mode (and rst-mode-lazy 'lazy-lock-mode)))
++ (append '((cons 'rst-mode (and rst-mode-lazy 'jit-lock-mode)))
+ font-lock-support-mode)))))
+
+ ;; Names and hooks
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 16_emacs_jit_lock.dpatch by Justin Mazzola Paluska <jmp at MIT.EDU>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix rst.el to use jit-lock (lazy-lock.el is obsoleted in emacs 22)
+
+ at DPATCH@
+
+--- docutils-0.4/tools/editors/emacs/rst.el~ 2007-04-09 15:04:06.000000000 -0400
++++ docutils-0.4/tools/editors/emacs/rst.el 2007-04-09 15:04:56.000000000 -0400
+@@ -2196,13 +2196,13 @@
+ ((or (not font-lock-support-mode) ;; No support mode set (but required)
+ (symbolp font-lock-support-mode)) ;; or a fixed mode for all
+ (setq font-lock-support-mode
+- (list (cons 'rst-mode (and rst-mode-lazy 'lazy-lock-mode))
++ (list (cons 'rst-mode (and rst-mode-lazy 'jit-lock-mode))
+ (cons t font-lock-support-mode))))
+ ((and (listp font-lock-support-mode)
+ (not (assoc 'rst-mode font-lock-support-mode)))
+ ;; A list of modes missing rst-mode
+ (setq font-lock-support-mode
+- (append '((cons 'rst-mode (and rst-mode-lazy 'lazy-lock-mode)))
++ (append '((cons 'rst-mode (and rst-mode-lazy 'jit-lock-mode)))
+ font-lock-support-mode)))))
+
+ ;; Names and hooks
Added: packages/python-docutils/trunk/debian/rsthelp2man.xsl
URL: http://svn.debian.org/wsvn/python-modules/packages/python-docutils/trunk/debian/rsthelp2man.xsl?rev=3629&op=file
==============================================================================
--- packages/python-docutils/trunk/debian/rsthelp2man.xsl (added)
+++ packages/python-docutils/trunk/debian/rsthelp2man.xsl Fri Nov 16 11:56:17 2007
@@ -1,0 +1,204 @@
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:str="http://exslt.org/strings"
+ extension-element-prefixes="str">
+
+ <!--
+ Copyright © 2007 Simon McVittie <http://smcv.pseudorandom.co.uk/>
+
+ 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.
+ -->
+
+ <xsl:output method="text" indent="no" encoding="ascii"/>
+
+ <xsl:param name="name" select="'rst2html'"/>
+ <xsl:param name="date" select="'October 2007'"/>
+ <xsl:param name="source" select="'docutils'"/>
+ <xsl:param name="section" select="'1'"/>
+ <xsl:param name="section_name" select="'User Commands'"/>
+ <xsl:param name="oneliner" select="'convert reST documents to HTML'"/>
+
+ <xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
+ <xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/>
+
+ <xsl:template match="section[@names='usage']">
+ <xsl:text>.SH SYNOPSIS </xsl:text>
+
+ <xsl:text>.IP </xsl:text>
+ <xsl:value-of select="block_quote/paragraph" />
+ <xsl:text> </xsl:text>
+
+ <xsl:text>.SH DESCRIPTION </xsl:text>
+ <xsl:value-of select="paragraph" />
+ <xsl:text> </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="option_string">
+ <xsl:text>\fB</xsl:text>
+ <xsl:value-of select="str:replace(., '-', '\-')"/>
+ <xsl:text>\fR</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="option">
+ <xsl:apply-templates/>
+ <xsl:if test="not(position() = last())">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="option_argument">
+ <xsl:value-of select="@delimiter"/>
+ <xsl:text>\fI</xsl:text>
+ <xsl:value-of select="."/>
+ <xsl:text>\fR</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="option_list_item">
+ <xsl:text>.TP </xsl:text>
+ <xsl:apply-templates select="option_group"/>
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates select="description"/>
+ <xsl:text> </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="section[@names='options']/section">
+ <xsl:text>\fB</xsl:text>
+ <xsl:value-of select="title"/>
+ <xsl:text>\fR </xsl:text>
+ <xsl:apply-templates select="option_list"/>
+ </xsl:template>
+
+ <xsl:template match="section[@names='options']">
+ <xsl:text>.SH OPTIONS </xsl:text>
+ <xsl:apply-templates select="section"/>
+ </xsl:template>
+
+ <xsl:template match="/">
+ <xsl:text>.TH </xsl:text>
+ <xsl:value-of select="translate($name, $lower, $upper)"/>
+ <xsl:text> "</xsl:text>
+ <xsl:value-of select="$section"/>
+ <xsl:text>" "</xsl:text>
+ <xsl:value-of select="$date"/>
+ <xsl:text>" "</xsl:text>
+ <xsl:value-of select="$source"/>
+ <xsl:text>" "</xsl:text>
+ <xsl:value-of select="$section_name"/>
+ <xsl:text>" </xsl:text>
+ <xsl:text>.SH NAME </xsl:text>
+ <xsl:value-of select="$name"/>
+ <xsl:text> \- </xsl:text>
+ <xsl:value-of select="$oneliner"/>
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates select="/document/section[@names='usage']"/>
+ <xsl:apply-templates select="/document/section[@names='options']"/>
+ <xsl:text>.SH AUTHOR </xsl:text>
+ <xsl:text>This man page was generated from the \-\-help output </xsl:text>
+ <xsl:text>of the tool it documents, using a script written by </xsl:text>
+ <xsl:text>Simon McVittie for the Debian GNU/Linux system. </xsl:text>
+ <xsl:text>The script may be used by others: please see the </xsl:text>
+ <xsl:text>Debian source package if you're interested.</xsl:text>
+ </xsl:template>
+
+</xsl:stylesheet>
+
+<!-- vim:set sw=2 sts=2 et noai noci: -->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:str="http://exslt.org/strings"
+ extension-element-prefixes="str">
+
+ <xsl:output method="text" indent="no" encoding="ascii"/>
+
+ <xsl:param name="name" select="'rst2html'"/>
+ <xsl:param name="date" select="'October 2007'"/>
+ <xsl:param name="source" select="'docutils'"/>
+ <xsl:param name="section" select="'1'"/>
+ <xsl:param name="section_name" select="'User Commands'"/>
+ <xsl:param name="oneliner" select="'convert reST documents to HTML'"/>
+
+ <xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
+ <xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/>
+
+ <xsl:template match="section[@names='usage']">
+ <xsl:text>.SH SYNOPSIS </xsl:text>
+
+ <xsl:text>.IP </xsl:text>
+ <xsl:value-of select="block_quote/paragraph" />
+ <xsl:text> </xsl:text>
+
+ <xsl:text>.SH DESCRIPTION </xsl:text>
+ <xsl:value-of select="paragraph" />
+ <xsl:text> </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="option_string">
+ <xsl:text>\fB</xsl:text>
+ <xsl:value-of select="str:replace(., '-', '\-')"/>
+ <xsl:text>\fR</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="option">
+ <xsl:apply-templates/>
+ <xsl:if test="not(position() = last())">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="option_argument">
+ <xsl:value-of select="@delimiter"/>
+ <xsl:text>\fI</xsl:text>
+ <xsl:value-of select="."/>
+ <xsl:text>\fR</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="option_list_item">
+ <xsl:text>.TP </xsl:text>
+ <xsl:apply-templates select="option_group"/>
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates select="description"/>
+ <xsl:text> </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="section[@names='options']/section">
+ <xsl:text>\fB</xsl:text>
+ <xsl:value-of select="title"/>
+ <xsl:text>\fR </xsl:text>
+ <xsl:apply-templates select="option_list"/>
+ </xsl:template>
+
+ <xsl:template match="section[@names='options']">
+ <xsl:text>.SH OPTIONS </xsl:text>
+ <xsl:apply-templates select="section"/>
+ </xsl:template>
+
+ <xsl:template match="/">
+ <xsl:text>.TH </xsl:text>
+ <xsl:value-of select="translate($name, $lower, $upper)"/>
+ <xsl:text> "</xsl:text>
+ <xsl:value-of select="$section"/>
+ <xsl:text>" "</xsl:text>
+ <xsl:value-of select="$date"/>
+ <xsl:text>" "</xsl:text>
+ <xsl:value-of select="$source"/>
+ <xsl:text>" "</xsl:text>
+ <xsl:value-of select="$section_name"/>
+ <xsl:text>" </xsl:text>
+ <xsl:text>.SH NAME </xsl:text>
+ <xsl:value-of select="$name"/>
+ <xsl:text> \- </xsl:text>
+ <xsl:value-of select="$oneliner"/>
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates select="/document/section[@names='usage']"/>
+ <xsl:apply-templates select="/document/section[@names='options']"/>
+ <xsl:text>.SH AUTHOR </xsl:text>
+ <xsl:text>This man page was generated from the \-\-help output </xsl:text>
+ <xsl:text>of the tool it documents, using a script written by </xsl:text>
+ <xsl:text>Simon McVittie for the Debian GNU/Linux system. </xsl:text>
+ <xsl:text>The script may be used by others: please see the </xsl:text>
+ <xsl:text>Debian source package if you're interested.</xsl:text>
+ </xsl:template>
+
+</xsl:stylesheet>
+
+<!-- vim:set sw=2 sts=2 et noai noci: -->
Added: packages/python-docutils/trunk/debian/unpep263.py
URL: http://svn.debian.org/wsvn/python-modules/packages/python-docutils/trunk/debian/unpep263.py?rev=3629&op=file
==============================================================================
--- packages/python-docutils/trunk/debian/unpep263.py (added)
+++ packages/python-docutils/trunk/debian/unpep263.py Fri Nov 16 11:56:17 2007
@@ -1,0 +1,42 @@
+#!/usr/bin/python
+
+# Convert PEP-0263 source code to ASCII, for compatibility with python-minimal
+# (which does not have the necessary encodings machinery).
+# Usage: python unpep263.py < orig.py > ascii.py
+# Caveats: assumes that the file is at least 2 lines long and that there
+# is no other useful information on the -*- coding -*- line
+
+# Copyright © 2007 Simon McVittie <http://smcv.pseudorandom.co.uk/>
+#
+# 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.
+
+import re
+import sys
+
+CODING = re.compile(r'^\s*#.*coding[:=]\s*([-\w.]+)')
+
+line = sys.stdin.readline()
+
+match = CODING.match(line)
+if match is None:
+ sys.stdout.write(line)
+ line = sys.stdin.readline()
+ match = CODING.match(line)
+
+if match is None:
+ sys.stdout.write(line)
+ for line in sys.stdin:
+ sys.stdout.write(line)
+ sys.exit(0)
+
+encoding = match.group(1)
+
+for line in sys.stdin:
+ u = line.decode(encoding)
+ for char in u:
+ if char <= u'\x7f':
+ sys.stdout.write(char.encode('ascii'))
+ else:
+ sys.stdout.write(char.encode('raw_unicode_escape'))
More information about the Python-modules-commits
mailing list