diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2015-02-21 16:59:18 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2015-02-21 16:59:18 +0000 |
| commit | ed3a7047aa19fd6253e9a255befea3605056686e (patch) | |
| tree | 5d4d52130eac30df6f7f563fbcae1fee0ff84853 /docutils/tools | |
| parent | 0170e630a8f7ba20f619fd19b0cd93fcfb315310 (diff) | |
| download | docutils-ed3a7047aa19fd6253e9a255befea3605056686e.tar.gz | |
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
Diffstat (limited to 'docutils/tools')
| -rwxr-xr-x | docutils/tools/rst2xhtml11.py | 39 |
1 files changed, 39 insertions, 0 deletions
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) |
