#!/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: 8585 $ # Date: $Date: 2020-12-01 12:38:25 +0100 (Di, 01. Dez 2020) $ """ 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)