Debian Codegraph @

tools/rst2odt.py

raw symbols SCIP
1 #!/usr/bin/env python3
2
3 # $Id: rst2odt.py 9768 2024-06-15 12:08:27Z milde $
4 # Author: Dave Kuhlman <[email protected]>
5 # Copyright: This module has been placed in the public domain.
6
7 """
8 A front end to the Docutils Publisher, producing OpenOffice documents.
9 """
10
11 try:
12 import locale
13 locale.setlocale(locale.LC_ALL, '')
14 except Exception:
15 pass
16
17 from docutils.core import publish_cmdline, default_description
18 from docutils.writers.odf_odt import Writer, Reader
19
20
21 description = ('Generates OpenDocument/OpenOffice/ODF documents from '
22 'standalone reStructuredText sources. ' + default_description)
23
24
25 writer = Writer()
26 reader = Reader()
27 output = publish_cmdline(reader=reader, writer=writer, description=description)