New HTML writer generating `XHTML1.1`_ styled with CSS2.
[docutils.git] / docutils / tools / rst2xhtml11.py
blob8349032ebb29d8b2da1dd6ea3792cfb90b1b2067
1 #!/usr/bin/env python
2 # -*- coding: utf8 -*-
3 # :Copyright: © 2005, 2009 Günter Milde.
4 # :License: Released under the terms of the `2-Clause BSD license`_, in short:
6 # Copying and distribution of this file, with or without modification,
7 # are permitted in any medium without royalty provided the copyright
8 # notice and this notice are preserved.
9 # This file is offered as-is, without any warranty.
11 # .. _2-Clause BSD license: http://www.spdx.org/licenses/BSD-2-Clause
13 # Revision: $Revision$
14 # Date: $Date$
16 """
17 A minimal front end to the Docutils Publisher, producing valid XHTML 1.1
18 """
20 try:
21 import locale # module missing in Jython
22 locale.setlocale(locale.LC_ALL, '')
23 except locale.Error:
24 pass
26 from docutils.core import publish_cmdline, default_description
28 # Import the xhtml11 writer from either the canonical place for a
29 # Docutils writer or anywhere in the PYTHONPATH::
31 from docutils.writers.xhtml11 import Writer
33 description = ('Generates CSS2-styled HTML documents from standalone '
34 'reStructuredText! sources that conform to the XHTML 1.1 DTD '
35 '(strict XHTML). '
36 + default_description)
38 publish_cmdline(writer=Writer(),
39 description=description)