From ed3a7047aa19fd6253e9a255befea3605056686e Mon Sep 17 00:00:00 2001 From: milde Date: Sat, 21 Feb 2015 16:59:18 +0000 Subject: New HTML writer generating `XHTML1.1`_ styled with CSS2. Moved to the docutils core from sandbox/html4strict. .. _XHTML1.1: http://www.w3.org/TR/xhtml11/ git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7798 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/tools/rst2xhtml11.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 docutils/tools/rst2xhtml11.py (limited to 'docutils/tools') diff --git a/docutils/tools/rst2xhtml11.py b/docutils/tools/rst2xhtml11.py new file mode 100755 index 000000000..8349032eb --- /dev/null +++ b/docutils/tools/rst2xhtml11.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python +# -*- coding: utf8 -*- +# :Copyright: © 2005, 2009 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: http://www.spdx.org/licenses/BSD-2-Clause +# +# Revision: $Revision$ +# Date: $Date$ + +""" +A minimal front end to the Docutils Publisher, producing valid XHTML 1.1 +""" + +try: + import locale # module missing in Jython + locale.setlocale(locale.LC_ALL, '') +except locale.Error: + pass + +from docutils.core import publish_cmdline, default_description + +# Import the xhtml11 writer from either the canonical place for a +# Docutils writer or anywhere in the PYTHONPATH:: + +from docutils.writers.xhtml11 import Writer + +description = ('Generates CSS2-styled HTML documents from standalone ' + 'reStructuredText! sources that conform to the XHTML 1.1 DTD ' + '(strict XHTML). ' + + default_description) + +publish_cmdline(writer=Writer(), + description=description) -- cgit v1.2.1