summaryrefslogtreecommitdiff
path: root/sandbox/presentations/pycon2006/architecture-extending-and-embedding/demo/rst2html_endnotes.py
diff options
context:
space:
mode:
authorwiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2007-02-26 19:05:47 +0000
committerwiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2007-02-26 19:05:47 +0000
commit00b157025ad9af8fb90ef9dd7a91531f16a75fb0 (patch)
treedfe363f339d10f541c4c18f340b5c4c7bae236a5 /sandbox/presentations/pycon2006/architecture-extending-and-embedding/demo/rst2html_endnotes.py
parent584b8924ea68612456471915d3f9b8187e088dba (diff)
downloaddocutils-00b157025ad9af8fb90ef9dd7a91531f16a75fb0.tar.gz
added old pycon2006 talk
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@4940 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'sandbox/presentations/pycon2006/architecture-extending-and-embedding/demo/rst2html_endnotes.py')
-rwxr-xr-xsandbox/presentations/pycon2006/architecture-extending-and-embedding/demo/rst2html_endnotes.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/sandbox/presentations/pycon2006/architecture-extending-and-embedding/demo/rst2html_endnotes.py b/sandbox/presentations/pycon2006/architecture-extending-and-embedding/demo/rst2html_endnotes.py
new file mode 100755
index 000000000..73971b3d6
--- /dev/null
+++ b/sandbox/presentations/pycon2006/architecture-extending-and-embedding/demo/rst2html_endnotes.py
@@ -0,0 +1,40 @@
+#!/usr/bin/env python
+
+# Author: David Goodger
+# Contact: goodger@python.org
+# Revision: $Revision$
+# Date: $Date$
+# Copyright: This module has been placed in the public domain.
+
+"""
+A minimal front end to the Docutils Publisher, producing HTML.
+"""
+
+try:
+ import locale
+ locale.setlocale(locale.LC_ALL, '')
+except:
+ pass
+
+from docutils.core import publish_cmdline, default_description
+
+
+description = ('Generates (X)HTML documents from standalone reStructuredText '
+ 'sources. ' + default_description)
+
+
+
+# Inserted ----------------------------------------
+import endnotes
+from docutils.readers import standalone
+
+class EndNotesReader(standalone.Reader):
+
+ def get_transforms(self):
+ return standalone.Reader.get_transforms(self) + \
+ [endnotes.EndNotes]
+# Inserted ----------------------------------------
+
+
+publish_cmdline(reader=EndNotesReader(),
+ writer_name='html', description=description)