|
From: <mi...@us...> - 2021-01-03 21:58:08
|
Revision: 8601
http://sourceforge.net/p/docutils/code/8601
Author: milde
Date: 2021-01-03 21:58:06 +0000 (Sun, 03 Jan 2021)
Log Message:
-----------
Clean up Markdown support.
Set 'docutils-cli.py' shebang to python3 (better chance of markdown support).
Remove the 'md2*.py' wrappers. (Use 'docutils-cli.py --parser=markdown'.)
Remove hard-coded print output from test suite when there is no recommonmark module.
Modified Paths:
--------------
trunk/docutils/test/DocutilsTestSupport.py
trunk/docutils/tools/docutils-cli.py
Removed Paths:
-------------
trunk/docutils/tools/md2html5.py
trunk/docutils/tools/md2pseudoxml.py
trunk/docutils/tools/md2xml.py
Modified: trunk/docutils/test/DocutilsTestSupport.py
===================================================================
--- trunk/docutils/test/DocutilsTestSupport.py 2021-01-03 21:57:56 UTC (rev 8600)
+++ trunk/docutils/test/DocutilsTestSupport.py 2021-01-03 21:58:06 UTC (rev 8601)
@@ -537,13 +537,9 @@
"""A collection of RecommonmarkParserTestCases."""
test_case_class = RecommonmarkParserTestCase
- skip_message = 'skip "%s" (module `recommonmark` not found)'
def generateTests(self, dict, dictname='totest'):
if 'recommonmark' not in recommonmark_wrapper.Parser.supported:
- if RecommonmarkParserTestSuite.skip_message: # warn (only once)
- print(self.skip_message%self.id)
- RecommonmarkParserTestSuite.skip_message = ''
return
# suppress UserWarnings from recommonmark parser
warnings.filterwarnings('ignore', message='Unsupported.*type')
Modified: trunk/docutils/tools/docutils-cli.py
===================================================================
--- trunk/docutils/tools/docutils-cli.py 2021-01-03 21:57:56 UTC (rev 8600)
+++ trunk/docutils/tools/docutils-cli.py 2021-01-03 21:58:06 UTC (rev 8601)
@@ -1,6 +1,6 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- coding: utf8 -*-
-# :Copyright: © 2015 Günter Milde.
+# :Copyright: © 2020 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,
@@ -49,8 +49,8 @@
# choices=('html', 'html4', 'html5', 'latex', 'xelatex',
# 'odt', 'xml', 'pseudoxml', 'manpage',
# 'pep_html', 's5_html'),
- help=u'Writer name (default "pseudoxml").',
- default='pseudoxml')
+ help=u'Writer name (default "html5").',
+ default='html5')
(args, remainder) = parser.parse_known_args()
Deleted: trunk/docutils/tools/md2html5.py
===================================================================
--- trunk/docutils/tools/md2html5.py 2021-01-03 21:57:56 UTC (rev 8600)
+++ trunk/docutils/tools/md2html5.py 2021-01-03 21:58:06 UTC (rev 8601)
@@ -1,39 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf8 -*-
-# :Copyright: © 2020 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 minimal front end to the Docutils Publisher, parsing CommonMark markdown files
-with `recommonmark` and producing HTML 5 documents.
-
-The output is also valid XML.
-"""
-
-try:
- import locale # module missing in Jython
- locale.setlocale(locale.LC_ALL, '')
-except locale.Error:
- pass
-
-from docutils.core import publish_cmdline, default_description
-
-
-description = (u'Generate HTML5 documents from standalone '
- u'Markdown (CommonMark) sources.\n'
- + default_description)
-
-publish_cmdline(#parser=mdparser,
- parser_name="recommonmark",
- writer_name='html5',
- description=description)
Deleted: trunk/docutils/tools/md2pseudoxml.py
===================================================================
--- trunk/docutils/tools/md2pseudoxml.py 2021-01-03 21:57:56 UTC (rev 8600)
+++ trunk/docutils/tools/md2pseudoxml.py 2021-01-03 21:58:06 UTC (rev 8601)
@@ -1,33 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf8 -*-
-# :Copyright: © 2020 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 minimal front end to the Docutils Publisher, parsing CommonMark markdown
-files with `recommonmark` and producing Pseudo-XML.
-"""
-
-try:
- import locale
- locale.setlocale(locale.LC_ALL, '')
-except:
- pass
-
-from docutils.core import publish_cmdline, default_description
-
-
-description = ('Generates Pseudo-XML from standalone '
- 'CommonMark sources. ' + default_description)
-
-publish_cmdline(parser_name='recommonmark', description=description)
Deleted: trunk/docutils/tools/md2xml.py
===================================================================
--- trunk/docutils/tools/md2xml.py 2021-01-03 21:57:56 UTC (rev 8600)
+++ trunk/docutils/tools/md2xml.py 2021-01-03 21:58:06 UTC (rev 8601)
@@ -1,34 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf8 -*-
-# :Copyright: © 2020 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 minimal front end to the Docutils Publisher, parsing CommonMark markdown
-files with `recommonmark` and producing Docutils XML.
-"""
-
-try:
- import locale
- locale.setlocale(locale.LC_ALL, '')
-except:
- pass
-
-from docutils.core import publish_cmdline, default_description
-
-
-description = ('Generates Docutils-native XML from standalone '
- 'CommonMark sources. ' + default_description)
-
-publish_cmdline(parser_name='recommonmark', writer_name='xml',
- description=description)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|