blob: 73971b3d6f29c1efd8495e3743a3c3473818a066 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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)
|