summaryrefslogtreecommitdiff
path: root/docutils
diff options
context:
space:
mode:
authormilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2016-12-10 17:41:45 +0000
committermilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2016-12-10 17:41:45 +0000
commitabaf74bd787d7bd4a2f11bde80c2a400dc261261 (patch)
treede3a990239fbfcfa296766b43ae6fa105aa21e1b /docutils
parent2bc4679020c1378c6279e4a4013f89ece0c65daf (diff)
downloaddocutils-abaf74bd787d7bd4a2f11bde80c2a400dc261261.tar.gz
Add rst2html4 front end. Update docs.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7994 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils')
-rw-r--r--docutils/HISTORY.txt1
-rw-r--r--docutils/RELEASE-NOTES.txt22
-rw-r--r--docutils/docs/user/html.txt4
-rwxr-xr-xdocutils/setup.py1
-rwxr-xr-xdocutils/tools/rst2html4.py26
5 files changed, 48 insertions, 6 deletions
diff --git a/docutils/HISTORY.txt b/docutils/HISTORY.txt
index 6c4f58c45..593942a4d 100644
--- a/docutils/HISTORY.txt
+++ b/docutils/HISTORY.txt
@@ -16,6 +16,7 @@
Changes Since 0.13.1
====================
+ - New front-end ``rst2html4.py``.
Release 0.13.1 (2016-12-09)
===========================
diff --git a/docutils/RELEASE-NOTES.txt b/docutils/RELEASE-NOTES.txt
index db9f416ab..4de208c93 100644
--- a/docutils/RELEASE-NOTES.txt
+++ b/docutils/RELEASE-NOTES.txt
@@ -34,9 +34,22 @@ Future changes
* Drop support for python 2.4 after release 0.13.
+* The default HTML writer may eventually become "html" with frontend
+ ``rst2html.py``.
+
+ Use `get_writer_by_name('html')` or the rst2html.py_ front end, if you
+ want the output to be up-to-date automatically.
+
+ Use a specific writer name or front end, if you depend on stability of the
+ generated HTML code, e.g. because you use a custom style sheet or
+ post-processing that may break otherwise.
+
+
Changes Since 0.13.1
====================
+ - New front-end ``rst2html4.py``.
+
Release 0.13.1 (2016-12-09)
===========================
@@ -52,13 +65,14 @@ Release 0.13.1 (2016-12-09)
.. _HTML 5: http://www.w3.org/TR/html5/
-* languages: persian/farsi and latvian/la mappings.
+* languages: persian/farsi (fa) and latvian (la) mappings.
-* change default base url for :rfc: to http://tools.ietf.org/html/
+* change default base url for :rfc: to http://tools.ietf.org/html/
-* tables accept widths, a list and align
+* tables accept widths, a list and align
-* latex2e: Fix admonition width, remove deprecated options, better tablewidth auto, ...
+* latex2e: Fix admonition width, remove deprecated options,
+ better tablewidth auto, ...
* rst.el : The problem with ``electric-indent-mode`` has been fixed.
diff --git a/docutils/docs/user/html.txt b/docutils/docs/user/html.txt
index b2e1af0f4..0de1099cb 100644
--- a/docutils/docs/user/html.txt
+++ b/docutils/docs/user/html.txt
@@ -95,7 +95,7 @@ html5_polyglot
:config: `[html5 writer]`_
The ``html5_polyglot`` writer generates `polyglot HTML`_ output, valid XML that
-is compatible with `HTML5`_.
+is compatible with `HTML5`_ (cf. `Benefits of polyglot XHTML5`_).
New features and elements will only be used if they are widely supported to
make documents `viewable with any browser`_.
@@ -113,7 +113,7 @@ New in Docutils 0.13
.. _plain.css: ../../docutils/writers/html5_polyglot/plain.css
.. _custom style sheets: ../howto/html-stylesheets.html
.. _viewable with any browser: http://www.anybrowser.org/campaign
-
+.. _Benefits of polyglot XHTML5: http://xmlplease.com/xhtml/xhtml5polyglot/
HTML writers in the sandbox
---------------------------
diff --git a/docutils/setup.py b/docutils/setup.py
index d45f9e228..c60bdfd13 100755
--- a/docutils/setup.py
+++ b/docutils/setup.py
@@ -168,6 +168,7 @@ what-you-see-is-what-you-get plaintext markup syntax.""", # wrap at col 60
]
+ s5_theme_files),
'scripts' : ['tools/rst2html.py',
+ 'tools/rst2html4.py',
'tools/rst2html5.py',
'tools/rst2s5.py',
'tools/rst2latex.py',
diff --git a/docutils/tools/rst2html4.py b/docutils/tools/rst2html4.py
new file mode 100755
index 000000000..a91f96a3f
--- /dev/null
+++ b/docutils/tools/rst2html4.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+
+# $Id$
+# Author: David Goodger <goodger@python.org>
+# Copyright: This module has been placed in the public domain.
+
+"""
+A minimal front end to the Docutils Publisher, producing (X)HTML.
+
+The output conforms to XHTML 1.0 transitional
+and almost to HTML 4.01 transitional (except for closing empty tags).
+"""
+
+try:
+ import locale
+ locale.setlocale(locale.LC_ALL, '')
+except:
+ pass
+
+from docutils.core import publish_cmdline, default_description
+
+
+description = ('Generates (X)HTML documents from standalone reStructuredText '
+ 'sources. ' + default_description)
+
+publish_cmdline(writer_name='html4', description=description)