diff options
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) |