|
From: <mi...@us...> - 2020-12-15 23:06:19
|
Revision: 8591
http://sourceforge.net/p/docutils/code/8591
Author: milde
Date: 2020-12-15 23:06:16 +0000 (Tue, 15 Dec 2020)
Log Message:
-----------
Rename the generic command line frontend to "docutils-cli.py"
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/RELEASE-NOTES.txt
Added Paths:
-----------
trunk/docutils/tools/docutils-cli.py
Removed Paths:
-------------
trunk/docutils/tools/docutils-frontend.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2020-12-14 22:44:30 UTC (rev 8590)
+++ trunk/docutils/HISTORY.txt 2020-12-15 23:06:16 UTC (rev 8591)
@@ -147,10 +147,10 @@
- Run python3 test like python2 against source not the build/-directory
-* tools/docutils_frontend.py
+* tools/docutils_cli.py
- - New generic front end that allows the selection of reader, parser,
- and writer components from the command line.
+ - New generic command line front end that allows the free selection of
+ reader, parser, and writer components.
Release 0.16
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2020-12-14 22:44:30 UTC (rev 8590)
+++ trunk/docutils/RELEASE-NOTES.txt 2020-12-15 23:06:16 UTC (rev 8591)
@@ -27,7 +27,7 @@
* `html5` writer:
Use <blockquote> instead of <div> tags for topics and admonitions.
-
+
Use <summary> and <details> tags for term and definition of a
definition list with class value "details".
@@ -78,7 +78,10 @@
* Installing with ``setup.py`` now requires setuptools_.
Alternatively, install with pip_.
-
+
+* The generic command line front end ``docutils-cli.py`` allows the
+ free selection of reader, parser, and writer components.
+
* HTML writers: new option to embed images.
* HTML5 writer:
@@ -89,7 +92,7 @@
Change the `initial_header_level`_ setting's default to "2", as browsers
use the `same style for <h1> and <h2> when nested in a section`__.
-
+
- Use HTML text-level tags <small>, <s>, <q>, <dfn>, <var>, <samp>, <kbd>,
<i>, <b>, <u>, <mark>, and <bdi> if a matching class value
is found in `inline` and `literal` elements.
@@ -118,9 +121,9 @@
- Most helper commands and element definitions are now defined in the
LaTeX package `docutils.sty`_ and only inserted in the document
preamble if the stylesheet__ setting does not lists "docutils".
-
+
__ docs/user/config.html#stylesheet-latex-writers
-
+
.. _setuptools: https://pypi.org/project/setuptools/
.. _pip: https://pypi.org/project/pip/
.. _legacy_class_functions: docs/user/config.html#legacy-class-functions
Copied: trunk/docutils/tools/docutils-cli.py (from rev 8590, trunk/docutils/tools/docutils-frontend.py)
===================================================================
--- trunk/docutils/tools/docutils-cli.py (rev 0)
+++ trunk/docutils/tools/docutils-cli.py 2020-12-15 23:06:16 UTC (rev 8591)
@@ -0,0 +1,67 @@
+#!/usr/bin/env python
+# -*- coding: utf8 -*-
+# :Copyright: © 2015 Günter Milde.
+# :License: Released under the terms of the `2-Clause BSD license`_, in short:
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.
+# This file is offered as-is, without any warranty.
+#
+# .. _2-Clause BSD license: https://opensource.org/licenses/BSD-2-Clause
+#
+# Revision: $Revision$
+# Date: $Date$
+
+"""
+A generic front end to the Docutils Publisher.
+"""
+
+try:
+ import locale # module missing in Jython
+ locale.setlocale(locale.LC_ALL, '')
+except locale.Error:
+ pass
+
+import argparse
+import sys
+
+from docutils.core import publish_cmdline, default_description
+
+description = (u'Generate documents from reStructuredText sources.'
+ )
+epilog = (u'Currently, the component selection cannot be specified in the '
+ u'configuration file. '
+ u'The availability of some options depends on the selected '
+ u'components, the list below adapts to your selection.'
+ )
+
+parser = argparse.ArgumentParser(add_help=False, description=description,
+ epilog=epilog)
+
+parser.add_argument('--reader', choices=('standalone', 'pep'),
+ help=u'Reader name (default "standalone").',
+ default='standalone')
+parser.add_argument('--parser', choices=('markdown', 'rst'),
+ help=u'Parser name (default "rst").',
+ default='rst')
+parser.add_argument('--writer',
+ # choices=('html', 'html4', 'html5', 'latex', 'xelatex',
+ # 'odt', 'xml', 'pseudoxml', 'manpage',
+ # 'pep_html', 's5_html'),
+ help=u'Writer name (default "pseudoxml").',
+ default='pseudoxml')
+
+(args, remainder) = parser.parse_known_args()
+
+
+if '-h' in sys.argv or '--help' in sys.argv:
+ print(parser.format_help())
+ print('')
+
+
+publish_cmdline(reader_name=args.reader,
+ parser_name=args.parser,
+ writer_name=args.writer,
+ description=default_description,
+ argv=remainder)
Deleted: trunk/docutils/tools/docutils-frontend.py
===================================================================
--- trunk/docutils/tools/docutils-frontend.py 2020-12-14 22:44:30 UTC (rev 8590)
+++ trunk/docutils/tools/docutils-frontend.py 2020-12-15 23:06:16 UTC (rev 8591)
@@ -1,67 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf8 -*-
-# :Copyright: © 2015 Günter Milde.
-# :License: Released under the terms of the `2-Clause BSD license`_, in short:
-#
-# Copying and distribution of this file, with or without modification,
-# are permitted in any medium without royalty provided the copyright
-# notice and this notice are preserved.
-# This file is offered as-is, without any warranty.
-#
-# .. _2-Clause BSD license: https://opensource.org/licenses/BSD-2-Clause
-#
-# Revision: $Revision$
-# Date: $Date$
-
-"""
-A generic front end to the Docutils Publisher.
-"""
-
-try:
- import locale # module missing in Jython
- locale.setlocale(locale.LC_ALL, '')
-except locale.Error:
- pass
-
-import argparse
-import sys
-
-from docutils.core import publish_cmdline, default_description
-
-description = (u'Generate documents from reStructuredText sources.'
- )
-epilog = (u'Currently, the component selection cannot be specified in the '
- u'configuration file. '
- u'The availability of some options depends on the selected '
- u'components, the list below adapts to your selection.'
- )
-
-parser = argparse.ArgumentParser(add_help=False, description=description,
- epilog=epilog)
-
-parser.add_argument('--reader', choices=('standalone', 'pep'),
- help=u'Reader name (default "standalone").',
- default='standalone')
-parser.add_argument('--parser', choices=('markdown', 'rst'),
- help=u'Parser name (default "rst").',
- default='rst')
-parser.add_argument('--writer',
- # choices=('html', 'html4', 'html5', 'latex', 'xelatex',
- # 'odt', 'xml', 'pseudoxml', 'manpage',
- # 'pep_html', 's5_html'),
- help=u'Writer name (default "pseudoxml").',
- default='pseudoxml')
-
-(args, remainder) = parser.parse_known_args()
-
-
-if '-h' in sys.argv or '--help' in sys.argv:
- print(parser.format_help())
- print('')
-
-
-publish_cmdline(reader_name=args.reader,
- parser_name=args.parser,
- writer_name=args.writer,
- description=default_description,
- argv=remainder)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|