diff options
author | wiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2007-02-26 19:05:47 +0000 |
---|---|---|
committer | wiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2007-02-26 19:05:47 +0000 |
commit | 00b157025ad9af8fb90ef9dd7a91531f16a75fb0 (patch) | |
tree | dfe363f339d10f541c4c18f340b5c4c7bae236a5 /sandbox/presentations/pycon2006/architecture-extending-and-embedding/demo/rst2html_endnotes.py | |
parent | 584b8924ea68612456471915d3f9b8187e088dba (diff) | |
download | docutils-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-x | sandbox/presentations/pycon2006/architecture-extending-and-embedding/demo/rst2html_endnotes.py | 40 |
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) |