diff options
| -rw-r--r-- | COPYING.txt | 2 | ||||
| -rw-r--r-- | FAQ.txt | 2 | ||||
| -rw-r--r-- | HISTORY.txt | 35 | ||||
| -rw-r--r-- | docs/dev/distributing.txt | 2 | ||||
| -rw-r--r-- | docs/dev/hacking.txt | 2 | ||||
| -rw-r--r-- | docs/dev/testing.txt | 2 | ||||
| -rw-r--r-- | docs/dev/todo.txt | 9 | ||||
| -rw-r--r-- | docs/howto/html-stylesheets.txt | 2 | ||||
| -rw-r--r-- | docs/peps/pep-0258.txt | 22 | ||||
| -rw-r--r-- | docs/user/config.txt | 11 | ||||
| -rw-r--r-- | docs/user/slide-shows.txt | 2 | ||||
| -rw-r--r-- | docs/user/tools.txt | 18 | ||||
| -rw-r--r-- | docutils/writers/__init__.py | 4 | ||||
| -rw-r--r-- | docutils/writers/html4css1/__init__.py (renamed from docutils/writers/html4css1.py) | 2 | ||||
| -rw-r--r-- | docutils/writers/html4css1/html4css1.css (renamed from docutils/writers/support/html4css1.css) | 0 | ||||
| -rw-r--r-- | docutils/writers/latex2e/__init__.py (renamed from docutils/writers/latex2e.py) | 0 | ||||
| -rw-r--r-- | docutils/writers/latex2e/latex2e.tex (renamed from docutils/writers/support/latex2e.tex) | 0 | ||||
| -rw-r--r-- | docutils/writers/newlatex2e/__init__.py (renamed from docutils/writers/newlatex2e.py) | 4 | ||||
| -rw-r--r-- | docutils/writers/newlatex2e/base.tex (renamed from docutils/writers/support/newlatex2e/base.tex) | 0 | ||||
| -rw-r--r-- | docutils/writers/newlatex2e/unicode_map.py (renamed from docutils/writers/support/newlatex2e/unicode_map.py) | 0 | ||||
| -rw-r--r-- | docutils/writers/pep_html/__init__.py (renamed from docutils/writers/pep_html.py) | 8 | ||||
| -rw-r--r-- | docutils/writers/pep_html/pep.css (renamed from docutils/writers/support/pep_html/pep.css) | 0 | ||||
| -rw-r--r-- | docutils/writers/pep_html/template.txt (renamed from docutils/writers/support/pep_html/template.txt) | 0 | ||||
| -rw-r--r-- | docutils/writers/s5_html/__init__.py (renamed from docutils/writers/s5_html.py) | 11 | ||||
| -rw-r--r-- | docutils/writers/s5_html/themes/README.txt (renamed from docutils/writers/support/s5_html/README.txt) | 0 | ||||
| -rw-r--r-- | docutils/writers/s5_html/themes/big-black/__base__ (renamed from docutils/writers/support/s5_html/big-black/__base__) | 0 | ||||
| -rw-r--r-- | docutils/writers/s5_html/themes/big-black/big_inverse/framing.css (renamed from docutils/writers/support/s5_html/big-black/big_inverse/framing.css) | 0 | ||||
| -rw-r--r-- | docutils/writers/s5_html/themes/big-black/framing.css (renamed from docutils/writers/support/s5_html/big-black/framing.css) | 0 | ||||
| -rw-r--r-- | docutils/writers/s5_html/themes/big-black/pretty.css (renamed from docutils/writers/support/s5_html/big-black/pretty.css) | 0 | ||||
| -rw-r--r-- | docutils/writers/s5_html/themes/big-white/framing.css (renamed from docutils/writers/support/s5_html/big-white/framing.css) | 0 | ||||
| -rw-r--r-- | docutils/writers/s5_html/themes/big-white/pretty.css (renamed from docutils/writers/support/s5_html/big-white/pretty.css) | 0 | ||||
| -rw-r--r-- | docutils/writers/s5_html/themes/default/blank.gif (renamed from docutils/writers/support/s5_html/default/blank.gif) | bin | 49 -> 49 bytes | |||
| -rw-r--r-- | docutils/writers/s5_html/themes/default/framing.css (renamed from docutils/writers/support/s5_html/default/framing.css) | 0 | ||||
| -rw-r--r-- | docutils/writers/s5_html/themes/default/iepngfix.htc (renamed from docutils/writers/support/s5_html/default/iepngfix.htc) | 0 | ||||
| -rw-r--r-- | docutils/writers/s5_html/themes/default/opera.css (renamed from docutils/writers/support/s5_html/default/opera.css) | 0 | ||||
| -rw-r--r-- | docutils/writers/s5_html/themes/default/outline.css (renamed from docutils/writers/support/s5_html/default/outline.css) | 0 | ||||
| -rw-r--r-- | docutils/writers/s5_html/themes/default/pretty.css (renamed from docutils/writers/support/s5_html/default/pretty.css) | 0 | ||||
| -rw-r--r-- | docutils/writers/s5_html/themes/default/print.css (renamed from docutils/writers/support/s5_html/default/print.css) | 0 | ||||
| -rw-r--r-- | docutils/writers/s5_html/themes/default/s5-core.css (renamed from docutils/writers/support/s5_html/default/s5-core.css) | 0 | ||||
| -rw-r--r-- | docutils/writers/s5_html/themes/default/slides.css (renamed from docutils/writers/support/s5_html/default/slides.css) | 0 | ||||
| -rw-r--r-- | docutils/writers/s5_html/themes/default/slides.js (renamed from docutils/writers/support/s5_html/default/slides.js) | 0 | ||||
| -rw-r--r-- | docutils/writers/s5_html/themes/medium-black/__base__ (renamed from docutils/writers/support/s5_html/medium-black/__base__) | 0 | ||||
| -rw-r--r-- | docutils/writers/s5_html/themes/medium-black/pretty.css (renamed from docutils/writers/support/s5_html/medium-black/pretty.css) | 0 | ||||
| -rw-r--r-- | docutils/writers/s5_html/themes/medium-white/framing.css (renamed from docutils/writers/support/s5_html/medium-white/framing.css) | 0 | ||||
| -rw-r--r-- | docutils/writers/s5_html/themes/medium-white/pretty.css (renamed from docutils/writers/support/s5_html/medium-white/pretty.css) | 0 | ||||
| -rw-r--r-- | docutils/writers/s5_html/themes/small-black/__base__ (renamed from docutils/writers/support/s5_html/small-black/__base__) | 0 | ||||
| -rw-r--r-- | docutils/writers/s5_html/themes/small-black/pretty.css (renamed from docutils/writers/support/s5_html/small-black/pretty.css) | 0 | ||||
| -rw-r--r-- | docutils/writers/s5_html/themes/small-white/framing.css (renamed from docutils/writers/support/s5_html/small-white/framing.css) | 0 | ||||
| -rw-r--r-- | docutils/writers/s5_html/themes/small-white/pretty.css (renamed from docutils/writers/support/s5_html/small-white/pretty.css) | 0 | ||||
| -rw-r--r-- | docutils/writers/support/__init__.py | 1 | ||||
| -rw-r--r-- | docutils/writers/support/newlatex2e/__init__.py | 1 | ||||
| -rwxr-xr-x | setup.py | 30 | ||||
| -rw-r--r-- | test/functional/expected/dangerous.html | 2 | ||||
| -rw-r--r-- | test/functional/expected/field_name_limit.html | 2 | ||||
| -rw-r--r-- | test/functional/expected/pep_html.html | 2 | ||||
| -rw-r--r-- | test/functional/expected/standalone_rst_html4css1.html | 2 | ||||
| -rw-r--r-- | test/functional/expected/standalone_rst_s5_html_1.html | 2 | ||||
| -rw-r--r-- | test/functional/expected/standalone_rst_s5_html_2.html | 2 | ||||
| -rw-r--r-- | tools/docutils.conf | 2 |
59 files changed, 94 insertions, 90 deletions
diff --git a/COPYING.txt b/COPYING.txt index 6411688bc..4994ef1fa 100644 --- a/COPYING.txt +++ b/COPYING.txt @@ -65,7 +65,7 @@ Exceptions The exceptions to the `Public Domain Dedication`_ above are: -* docutils/writers/support/s5_html/default/iepngfix.htc: +* docutils/writers/s5_html/themes/default/iepngfix.htc: IE5.5+ PNG Alpha Fix v1.0 by Angus Turnbull <http://www.twinhelix.com>. Free usage permitted as long as @@ -766,7 +766,7 @@ cascading stylesheet is required for proper viewing with a modern graphical browser. Correct rendering of the HTML produced depends on the CSS support of the browser. A general-purpose stylesheet, ``html4css1.css`` is provided with the code, and is embedded by -default. It is installed in the "writers/support/" subdirectory +default. It is installed in the "writers/html4css1/" subdirectory within the Docutils package. Use the ``--help`` command-line option to see the specific location on your machine. diff --git a/HISTORY.txt b/HISTORY.txt index ba3d38eec..d98833e1e 100644 --- a/HISTORY.txt +++ b/HISTORY.txt @@ -159,6 +159,17 @@ Changes Since 0.3.9 - Added ``Compound`` transform, which flattens compound paragraphs. +* docutils/writers/: Several writer modules (html4css1.py) were + converted into packages. Support modules and data files have been + moved into the packages. + + The stylesheets for the HTML writers are now installed along with + the code, the code knows where to find them, and the default is to + use them (actually, to embed them). Some adjustments to + configuration files may be necessary. The easiest way to obtain the + new default behavior is to remove all settings whose name includes + "stylesheet". + * docutils/writers/__init__.py: - Added universal.Messages and universal.FilterMessages transforms @@ -171,7 +182,7 @@ Changes Since 0.3.9 - Made ``xmlcharrefreplace`` the default output encoding error handler. -* docutils/writers/html4css1.py: +* docutils/writers/html4css1/: - Added support for image width and height units. - Made ``xmlcharrefreplace`` the default output encoding error @@ -189,25 +200,16 @@ Changes Since 0.3.9 - Fixed support for centered images. - Added support for class="compact" & class="open" lists. -* docutils/writers/latex2e.py: +* docutils/writers/latex2e/: - Underscores in citekeys are no longer escaped. -* docutils/writers/s5_html.py: Added to project; writer for S5-format - slide shows. - -* docutils/writers/support/: Directory added to project. Modules and - data files that support writers have been moved here. - - The stylesheets are now installed along with the code, the code - knows where to find them, and the default is to use (actually, to - embed) the built-in stylesheets. Some adjustments to configuration - files may be necessary. The easiest way to obtain the new default - behavior is to remove all settings whose name includes "stylesheet". - -* docutils/writers/support/newlatex2e/unicode_map.py: Added to +* docutils/writers/newlatex2e/unicode_map.py: Added to project; mapping of Unicode characters to LaTeX equivalents. +* docutils/writers/s5_html/: Package added to project; writer for + S5/HTML slide shows. + * docs/dev/distributing.txt: Added to project; guide for distributors (package maintainers). @@ -270,8 +272,7 @@ Changes Since 0.3.9 and fixed many bugs. See docs/user/emacs.txt for details. * tools/stylesheets: Removed from project. Stylesheets have been - renamed and moved to docutils/writers/support/ or its - subdirectories. + renamed and moved into writer packages. Release 0.3.9 (2005-05-26) diff --git a/docs/dev/distributing.txt b/docs/dev/distributing.txt index 498a9fa34..c81807279 100644 --- a/docs/dev/distributing.txt +++ b/docs/dev/distributing.txt @@ -86,7 +86,7 @@ generate HTML for all documentation files, go to the ``tools/`` directory and run:: # Place html4css1.css in base directory. - cp ../docutils/writers/support/html4css1.css .. + cp ../docutils/writers/html4css1/html4css1.css .. ./buildhtml.py --stylesheet-path=../html4css1.css .. Then install the following files to ``/usr/share/doc/docutils/`` (or diff --git a/docs/dev/hacking.txt b/docs/dev/hacking.txt index dcbc80943..d0ec9a3fb 100644 --- a/docs/dev/hacking.txt +++ b/docs/dev/hacking.txt @@ -166,7 +166,7 @@ For HTML output, we can test this using the ``rst2html.py`` tool:: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" /> <title></title> - <link rel="stylesheet" href="../docutils/writers/support/html4css1.css" type="text/css" /> + <link rel="stylesheet" href="../docutils/writers/html4css1/html4css1.css" type="text/css" /> </head> <body> <div class="document"> diff --git a/docs/dev/testing.txt b/docs/dev/testing.txt index 82e9ed31c..bde54116f 100644 --- a/docs/dev/testing.txt +++ b/docs/dev/testing.txt @@ -184,7 +184,7 @@ For example, ``functional/tests/some_test.py`` could read like this:: writer_name = "html" settings_overrides['output-encoding'] = 'utf-8' # Relative to main ``test/`` directory. - settings_overrides['stylesheet_path'] = '../docutils/writers/support/html4css1.css' + settings_overrides['stylesheet_path'] = '../docutils/writers/html4css1/html4css1.css' The two variables ``test_source`` and ``test_destination`` contain the input file name (relative to ``functional/input/``) and the output diff --git a/docs/dev/todo.txt b/docs/dev/todo.txt index 06ce321f1..1074daf33 100644 --- a/docs/dev/todo.txt +++ b/docs/dev/todo.txt @@ -1,3 +1,4 @@ + ====================== Docutils_ To Do List ====================== @@ -44,6 +45,9 @@ the short term) to include: * [DONE in rev. 3901] Move support files to docutils/writers/support. +* [DONE in rev. 4163] Convert ``docutils/writers/support/*`` into + individual writer packages. + * [DONE in rev. 3901] Remove docutils.transforms.html.StylesheetCheck (no longer needed because of the above change). @@ -52,10 +56,7 @@ the short term) to include: * [DONE in rev. 4152] Added East-Asian double-width character support. -* Merge the S5 branch. - -* Convert ``docutils/writers/support/*`` to individual writer - packages. +* [DONE in rev. 4156] Merge the S5 branch. Anything else? diff --git a/docs/howto/html-stylesheets.txt b/docs/howto/html-stylesheets.txt index 1f61bab5d..9369f2d3c 100644 --- a/docs/howto/html-stylesheets.txt +++ b/docs/howto/html-stylesheets.txt @@ -13,7 +13,7 @@ The look of Docutils' HTML output is customizable via a CSS stylesheet. The default stylesheet is called ``html4css1.css`` and -can be found in the ``writers/support/`` directory of the Docutils +can be found in the ``writers/html4css1/`` directory of the Docutils installation. Use the command ``rst2html.py --help`` and look at the description of the ``--stylesheet-path`` command-line option for the exact machine-specific location. diff --git a/docs/peps/pep-0258.txt b/docs/peps/pep-0258.txt index 47ede6c21..0d646bb82 100644 --- a/docs/peps/pep-0258.txt +++ b/docs/peps/pep-0258.txt @@ -416,12 +416,18 @@ Docutils Package Structure by name. Class "Writer" is the base class of specific writers. (``docutils/writers/__init__.py``) - - Module "docutils.writers.html4css1" is a simple HyperText Markup - Language document tree writer for HTML 4.01 and CSS1. + - Package "docutils.writers.html4css1" is a simple HyperText + Markup Language document tree writer for HTML 4.01 and CSS1. - - Module "docutils.writers.latex2e" writes LaTeX. + - Package "docutils.writers.pep_html" generates HTML from + reStructuredText PEPs. - - Module "docutils.writers.newlatex2e" also writes LaTeX; it is a + - Package "docutils.writers.s5_html" generates S5/HTML slide + shows. + + - Package "docutils.writers.latex2e" writes LaTeX. + + - Package "docutils.writers.newlatex2e" also writes LaTeX; it is a new implementation. - Module "docutils.writers.docutils_xml" writes the internal @@ -438,12 +444,10 @@ Docutils Package Structure such as DocBook), PDF, plaintext, reStructuredText, and perhaps others. - See `Writers`_ above. + Subpackages of "docutils.writers" contain modules and data files + (such as stylesheets) that support the individual writers. - - Package "docutils.writers.support": modules and data files that - support the various writers. The names of subdirectories and - basenames of files immediately within the support/ directory must - match the corresponding writer module names. + See `Writers`_ above. - Package "docutils.transforms": tree transform classes. diff --git a/docs/user/config.txt b/docs/user/config.txt index 32165c280..c5ec73492 100644 --- a/docs/user/config.txt +++ b/docs/user/config.txt @@ -663,9 +663,9 @@ stylesheet_path setting [#override]_. Path is adjusted relative to the output HTML file. Also defined for the `LaTeX Writer`__. - Default: "html4css1.css" in the docutils/writers/support directory - (installed automatically; for the exact machine-specific path, use - the ``--help`` option). Options: ``--stylesheet-path``. + Default: "html4css1.css" in the docutils/writers/html4css1/ + directory (installed automatically; for the exact machine-specific + path, use the ``--help`` option). Options: ``--stylesheet-path``. __ `stylesheet_path [latex2e writer]`_ @@ -694,9 +694,8 @@ before the "[pep_html writer]" section. The PEP/HTML Writer's default for the ``stylesheet_path`` setting differs from that of the standard HTML Writer: -``docutils/writers/support/pep_html/pep.css`` in the installation -directory is used. For the exact machine-specific path, use the -``--help`` option. +``docutils/writers/pep_html/pep.css`` in the installation directory is +used. For the exact machine-specific path, use the ``--help`` option. _`no_random` Do not use a random banner image. Mainly used to get predictable diff --git a/docs/user/slide-shows.txt b/docs/user/slide-shows.txt index 1fdd8398b..6a0f6655f 100644 --- a/docs/user/slide-shows.txt +++ b/docs/user/slide-shows.txt @@ -655,7 +655,7 @@ Making a Custom Theme * create a personal reusable theme (plugin) * submit the new theme to Docutils - ``docutils/writers/support/s5_html/<theme>`` + ``docutils/writers/s5_html/themes/<theme>`` .. container:: handout diff --git a/docs/user/tools.txt b/docs/user/tools.txt index 6f39b5021..20f5a3b2f 100644 --- a/docs/user/tools.txt +++ b/docs/user/tools.txt @@ -127,14 +127,14 @@ Stylesheets ``rst2html.py`` inserts into the generated HTML a cascading stylesheet (or a link to a stylesheet, when passing the "``--link-stylesheet``" option). A stylesheet is required for proper rendering. The default -stylesheet (``docutils/writers/support/html4css1.css``, located in the -installation directory) is provided for basic use. To use a different -stylesheet, you must specify the stylesheet's location with a -"``--stylesheet``" (for a URL) or "``--stylesheet-path``" (for a local -file) command-line option, or with `configuration file`_ settings -(e.g. ``./docutils.conf`` or ``~/.docutils``). To experiment with -styles, please see the `guide to writing HTML (CSS) stylesheets for -Docutils`__. +stylesheet (``docutils/writers/html4css1/html4css1.css``, located in +the installation directory) is provided for basic use. To use a +different stylesheet, you must specify the stylesheet's location with +a "``--stylesheet``" (for a URL) or "``--stylesheet-path``" (for a +local file) command-line option, or with `configuration file`_ +settings (e.g. ``./docutils.conf`` or ``~/.docutils``). To experiment +with styles, please see the `guide to writing HTML (CSS) stylesheets +for Docutils`__. __ ../howto/html-stylesheets.html @@ -150,7 +150,7 @@ rstpep2html.py reStructuredText) and produces HTML. It requires a template file and a stylesheet. By default, it makes use of a "``pep-html-template``" file and the "``pep.css``" stylesheet (both in the -``docutils/writers/support/`` directory), but these can be overridden +``docutils/writers/pep_html/`` directory), but these can be overridden by command-line options or configuration files. For example, to process a PEP into HTML:: diff --git a/docutils/writers/__init__.py b/docutils/writers/__init__.py index fb4cbee0b..5482cad42 100644 --- a/docutils/writers/__init__.py +++ b/docutils/writers/__init__.py @@ -15,10 +15,6 @@ import os.path import docutils from docutils import languages, Component from docutils.transforms import universal -from docutils.writers import support - - -support_path = os.path.dirname(support.__file__) class Writer(Component): diff --git a/docutils/writers/html4css1.py b/docutils/writers/html4css1/__init__.py index 065d90584..9543e9016 100644 --- a/docutils/writers/html4css1.py +++ b/docutils/writers/html4css1/__init__.py @@ -39,7 +39,7 @@ class Writer(writers.Writer): default_stylesheet_path = utils.relative_path( os.path.join(os.getcwd(), 'dummy'), - os.path.join(writers.support_path, default_stylesheet)) + os.path.join(os.path.dirname(__file__), default_stylesheet)) settings_spec = ( 'HTML-Specific Options', diff --git a/docutils/writers/support/html4css1.css b/docutils/writers/html4css1/html4css1.css index d477c8053..d477c8053 100644 --- a/docutils/writers/support/html4css1.css +++ b/docutils/writers/html4css1/html4css1.css diff --git a/docutils/writers/latex2e.py b/docutils/writers/latex2e/__init__.py index 695160dd4..695160dd4 100644 --- a/docutils/writers/latex2e.py +++ b/docutils/writers/latex2e/__init__.py diff --git a/docutils/writers/support/latex2e.tex b/docutils/writers/latex2e/latex2e.tex index 6e041a14b..6e041a14b 100644 --- a/docutils/writers/support/latex2e.tex +++ b/docutils/writers/latex2e/latex2e.tex diff --git a/docutils/writers/newlatex2e.py b/docutils/writers/newlatex2e/__init__.py index e3d0a738b..af397ba95 100644 --- a/docutils/writers/newlatex2e.py +++ b/docutils/writers/newlatex2e/__init__.py @@ -21,7 +21,7 @@ from types import ListType import docutils from docutils import nodes, writers, utils -from docutils.writers.support.newlatex2e import unicode_map +from docutils.writers.newlatex2e import unicode_map from docutils.transforms import writer_aux @@ -34,7 +34,7 @@ class Writer(writers.Writer): default_stylesheet_path = utils.relative_path( os.path.join(os.getcwd(), 'dummy'), - os.path.join(writers.support_path, 'newlatex2e', default_stylesheet)) + os.path.join(os.path.dirname(__file__), default_stylesheet)) settings_spec = ( 'LaTeX-Specific Options', diff --git a/docutils/writers/support/newlatex2e/base.tex b/docutils/writers/newlatex2e/base.tex index 231f3911f..231f3911f 100644 --- a/docutils/writers/support/newlatex2e/base.tex +++ b/docutils/writers/newlatex2e/base.tex diff --git a/docutils/writers/support/newlatex2e/unicode_map.py b/docutils/writers/newlatex2e/unicode_map.py index 2998178f4..2998178f4 100644 --- a/docutils/writers/support/newlatex2e/unicode_map.py +++ b/docutils/writers/newlatex2e/unicode_map.py diff --git a/docutils/writers/pep_html.py b/docutils/writers/pep_html/__init__.py index 1fdc36f30..a672e1c6d 100644 --- a/docutils/writers/pep_html.py +++ b/docutils/writers/pep_html/__init__.py @@ -21,17 +21,17 @@ from docutils.writers import html4css1 class Writer(html4css1.Writer): - default_stylesheet = 'pep_html/pep.css' + default_stylesheet = 'pep.css' default_stylesheet_path = utils.relative_path( os.path.join(os.getcwd(), 'dummy'), - os.path.join(writers.support_path, default_stylesheet)) + os.path.join(os.path.dirname(__file__), default_stylesheet)) - default_template = 'pep_html/template.txt' + default_template = 'template.txt' default_template_path = utils.relative_path( os.path.join(os.getcwd(), 'dummy'), - os.path.join(writers.support_path, default_template)) + os.path.join(os.path.dirname(__file__), default_template)) settings_spec = html4css1.Writer.settings_spec + ( 'PEP/HTML-Specific Options', diff --git a/docutils/writers/support/pep_html/pep.css b/docutils/writers/pep_html/pep.css index 014d3e423..014d3e423 100644 --- a/docutils/writers/support/pep_html/pep.css +++ b/docutils/writers/pep_html/pep.css diff --git a/docutils/writers/support/pep_html/template.txt b/docutils/writers/pep_html/template.txt index 6f96977e8..6f96977e8 100644 --- a/docutils/writers/support/pep_html/template.txt +++ b/docutils/writers/pep_html/template.txt diff --git a/docutils/writers/s5_html.py b/docutils/writers/s5_html/__init__.py index 1a25abc82..39c958887 100644 --- a/docutils/writers/s5_html.py +++ b/docutils/writers/s5_html/__init__.py @@ -17,20 +17,21 @@ import sys import os import re import docutils -from docutils import frontend, nodes, utils, writers +from docutils import frontend, nodes, utils from docutils.writers import html4css1 from docutils.parsers.rst import directives -support_path = utils.relative_path( +themes_dir_path = utils.relative_path( os.path.join(os.getcwd(), 'dummy'), - os.path.join(writers.support_path, 's5_html')) + os.path.join(os.path.dirname(__file__), 'themes')) def find_theme(name): # Where else to look for a theme? # Check working dir? Destination dir? Config dir? Plugins dir? - path = os.path.join(support_path, name) + path = os.path.join(themes_dir_path, name) if not os.path.isdir(path): - raise docutils.ApplicationError('Theme directory not found: %r' % name) + raise docutils.ApplicationError('Theme directory not found: %r (path: %r)' + % (name, path)) return path diff --git a/docutils/writers/support/s5_html/README.txt b/docutils/writers/s5_html/themes/README.txt index 2e01b51ee..2e01b51ee 100644 --- a/docutils/writers/support/s5_html/README.txt +++ b/docutils/writers/s5_html/themes/README.txt diff --git a/docutils/writers/support/s5_html/big-black/__base__ b/docutils/writers/s5_html/themes/big-black/__base__ index f08be9ad5..f08be9ad5 100644 --- a/docutils/writers/support/s5_html/big-black/__base__ +++ b/docutils/writers/s5_html/themes/big-black/__base__ diff --git a/docutils/writers/support/s5_html/big-black/big_inverse/framing.css b/docutils/writers/s5_html/themes/big-black/big_inverse/framing.css index 5a31113fb..5a31113fb 100644 --- a/docutils/writers/support/s5_html/big-black/big_inverse/framing.css +++ b/docutils/writers/s5_html/themes/big-black/big_inverse/framing.css diff --git a/docutils/writers/support/s5_html/big-black/framing.css b/docutils/writers/s5_html/themes/big-black/framing.css index 5a31113fb..5a31113fb 100644 --- a/docutils/writers/support/s5_html/big-black/framing.css +++ b/docutils/writers/s5_html/themes/big-black/framing.css diff --git a/docutils/writers/support/s5_html/big-black/pretty.css b/docutils/writers/s5_html/themes/big-black/pretty.css index 91a85dec2..91a85dec2 100644 --- a/docutils/writers/support/s5_html/big-black/pretty.css +++ b/docutils/writers/s5_html/themes/big-black/pretty.css diff --git a/docutils/writers/support/s5_html/big-white/framing.css b/docutils/writers/s5_html/themes/big-white/framing.css index cd343432b..cd343432b 100644 --- a/docutils/writers/support/s5_html/big-white/framing.css +++ b/docutils/writers/s5_html/themes/big-white/framing.css diff --git a/docutils/writers/support/s5_html/big-white/pretty.css b/docutils/writers/s5_html/themes/big-white/pretty.css index 8ecb1dd65..8ecb1dd65 100644 --- a/docutils/writers/support/s5_html/big-white/pretty.css +++ b/docutils/writers/s5_html/themes/big-white/pretty.css diff --git a/docutils/writers/support/s5_html/default/blank.gif b/docutils/writers/s5_html/themes/default/blank.gif Binary files differindex 75b945d25..75b945d25 100644 --- a/docutils/writers/support/s5_html/default/blank.gif +++ b/docutils/writers/s5_html/themes/default/blank.gif diff --git a/docutils/writers/support/s5_html/default/framing.css b/docutils/writers/s5_html/themes/default/framing.css index c4727f303..c4727f303 100644 --- a/docutils/writers/support/s5_html/default/framing.css +++ b/docutils/writers/s5_html/themes/default/framing.css diff --git a/docutils/writers/support/s5_html/default/iepngfix.htc b/docutils/writers/s5_html/themes/default/iepngfix.htc index 9f3d628b5..9f3d628b5 100644 --- a/docutils/writers/support/s5_html/default/iepngfix.htc +++ b/docutils/writers/s5_html/themes/default/iepngfix.htc diff --git a/docutils/writers/support/s5_html/default/opera.css b/docutils/writers/s5_html/themes/default/opera.css index c9d1148be..c9d1148be 100644 --- a/docutils/writers/support/s5_html/default/opera.css +++ b/docutils/writers/s5_html/themes/default/opera.css diff --git a/docutils/writers/support/s5_html/default/outline.css b/docutils/writers/s5_html/themes/default/outline.css index cb3588d5a..cb3588d5a 100644 --- a/docutils/writers/support/s5_html/default/outline.css +++ b/docutils/writers/s5_html/themes/default/outline.css diff --git a/docutils/writers/support/s5_html/default/pretty.css b/docutils/writers/s5_html/themes/default/pretty.css index f83ca2bf5..f83ca2bf5 100644 --- a/docutils/writers/support/s5_html/default/pretty.css +++ b/docutils/writers/s5_html/themes/default/pretty.css diff --git a/docutils/writers/support/s5_html/default/print.css b/docutils/writers/s5_html/themes/default/print.css index 76e6352ee..76e6352ee 100644 --- a/docutils/writers/support/s5_html/default/print.css +++ b/docutils/writers/s5_html/themes/default/print.css diff --git a/docutils/writers/support/s5_html/default/s5-core.css b/docutils/writers/s5_html/themes/default/s5-core.css index 6965f5e8f..6965f5e8f 100644 --- a/docutils/writers/support/s5_html/default/s5-core.css +++ b/docutils/writers/s5_html/themes/default/s5-core.css diff --git a/docutils/writers/support/s5_html/default/slides.css b/docutils/writers/s5_html/themes/default/slides.css index 82bdc0ee0..82bdc0ee0 100644 --- a/docutils/writers/support/s5_html/default/slides.css +++ b/docutils/writers/s5_html/themes/default/slides.css diff --git a/docutils/writers/support/s5_html/default/slides.js b/docutils/writers/s5_html/themes/default/slides.js index f0f81bbf8..f0f81bbf8 100644 --- a/docutils/writers/support/s5_html/default/slides.js +++ b/docutils/writers/s5_html/themes/default/slides.js diff --git a/docutils/writers/support/s5_html/medium-black/__base__ b/docutils/writers/s5_html/themes/medium-black/__base__ index 401b621bd..401b621bd 100644 --- a/docutils/writers/support/s5_html/medium-black/__base__ +++ b/docutils/writers/s5_html/themes/medium-black/__base__ diff --git a/docutils/writers/support/s5_html/medium-black/pretty.css b/docutils/writers/s5_html/themes/medium-black/pretty.css index 6bc13353a..6bc13353a 100644 --- a/docutils/writers/support/s5_html/medium-black/pretty.css +++ b/docutils/writers/s5_html/themes/medium-black/pretty.css diff --git a/docutils/writers/support/s5_html/medium-white/framing.css b/docutils/writers/s5_html/themes/medium-white/framing.css index 6c4e3abf2..6c4e3abf2 100644 --- a/docutils/writers/support/s5_html/medium-white/framing.css +++ b/docutils/writers/s5_html/themes/medium-white/framing.css diff --git a/docutils/writers/support/s5_html/medium-white/pretty.css b/docutils/writers/s5_html/themes/medium-white/pretty.css index fe70a39f7..fe70a39f7 100644 --- a/docutils/writers/support/s5_html/medium-white/pretty.css +++ b/docutils/writers/s5_html/themes/medium-white/pretty.css diff --git a/docutils/writers/support/s5_html/small-black/__base__ b/docutils/writers/s5_html/themes/small-black/__base__ index 67f4db2bf..67f4db2bf 100644 --- a/docutils/writers/support/s5_html/small-black/__base__ +++ b/docutils/writers/s5_html/themes/small-black/__base__ diff --git a/docutils/writers/support/s5_html/small-black/pretty.css b/docutils/writers/s5_html/themes/small-black/pretty.css index 991bb9fdb..991bb9fdb 100644 --- a/docutils/writers/support/s5_html/small-black/pretty.css +++ b/docutils/writers/s5_html/themes/small-black/pretty.css diff --git a/docutils/writers/support/s5_html/small-white/framing.css b/docutils/writers/s5_html/themes/small-white/framing.css index 70287dd06..70287dd06 100644 --- a/docutils/writers/support/s5_html/small-white/framing.css +++ b/docutils/writers/s5_html/themes/small-white/framing.css diff --git a/docutils/writers/support/s5_html/small-white/pretty.css b/docutils/writers/s5_html/themes/small-white/pretty.css index 243763ffc..243763ffc 100644 --- a/docutils/writers/support/s5_html/small-white/pretty.css +++ b/docutils/writers/s5_html/themes/small-white/pretty.css diff --git a/docutils/writers/support/__init__.py b/docutils/writers/support/__init__.py deleted file mode 100644 index 87197468a..000000000 --- a/docutils/writers/support/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# This file is needed for Python to treat this directory as a package. diff --git a/docutils/writers/support/newlatex2e/__init__.py b/docutils/writers/support/newlatex2e/__init__.py deleted file mode 100644 index 87197468a..000000000 --- a/docutils/writers/support/newlatex2e/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# This file is needed for Python to treat this directory as a package. @@ -60,21 +60,25 @@ what-you-see-is-what-you-get plaintext markup syntax.""", # wrap at col 60 'docutils.readers.python', 'docutils.transforms', 'docutils.writers', - 'docutils.writers.support', - 'docutils.writers.support.newlatex2e'], + 'docutils.writers.html4css1', + 'docutils.writers.pep_html', + 'docutils.writers.s5_html', + 'docutils.writers.latex2e', + 'docutils.writers.newlatex2e'], 'data_files': [('docutils/parsers/rst/include', glob.glob('docutils/parsers/rst/include/*.txt')), - ('docutils/writers/support', - ['docutils/writers/support/html4css1.css', - 'docutils/writers/support/latex2e.tex']), - ('docutils/writers/support/newlatex2e', - ['docutils/writers/support/newlatex2e/base.tex']), - ('docutils/writers/support/pep_html', - ['docutils/writers/support/pep_html/pep.css', - 'docutils/writers/support/pep_html/template.txt']), - ('docutils/writers/support/s5_html', - (['docutils/writers/support/s5_html/README.txt'] - + glob.glob('docutils/writers/support/s5_html/*/*')))], + ('docutils/writers/html4css1', + ['docutils/writers/html4css1/html4css1.css']), + ('docutils/writers/latex2e', + 'docutils/writers/latex2e/latex2e.tex']), + ('docutils/writers/newlatex2e', + ['docutils/writers/newlatex2e/base.tex']), + ('docutils/writers/pep_html', + ['docutils/writers/pep_html/pep.css', + 'docutils/writers/pep_html/template.txt']), + ('docutils/writers/s5_html', + (['docutils/writers/s5_html/README.txt'] + + glob.glob('docutils/writers/s5_html/*/*')))], 'scripts' : ['tools/rst2html.py', 'tools/rst2s5.py', 'tools/rst2latex.py', diff --git a/test/functional/expected/dangerous.html b/test/functional/expected/dangerous.html index 8eb626e62..4fb19524c 100644 --- a/test/functional/expected/dangerous.html +++ b/test/functional/expected/dangerous.html @@ -5,7 +5,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" /> <title></title> -<link rel="stylesheet" href="../../../docutils/writers/support/html4css1.css" type="text/css" /> +<link rel="stylesheet" href="../../../docutils/writers/html4css1/html4css1.css" type="text/css" /> </head> <body> <div class="document"> diff --git a/test/functional/expected/field_name_limit.html b/test/functional/expected/field_name_limit.html index 81bc6dc3a..2dabcd7f0 100644 --- a/test/functional/expected/field_name_limit.html +++ b/test/functional/expected/field_name_limit.html @@ -5,7 +5,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" /> <title></title> -<link rel="stylesheet" href="../../../docutils/writers/support/html4css1.css" type="text/css" /> +<link rel="stylesheet" href="../../../docutils/writers/html4css1/html4css1.css" type="text/css" /> </head> <body> <div class="document"> diff --git a/test/functional/expected/pep_html.html b/test/functional/expected/pep_html.html index 277b2e6ca..5c9075751 100644 --- a/test/functional/expected/pep_html.html +++ b/test/functional/expected/pep_html.html @@ -10,7 +10,7 @@ to templates. DO NOT USE THIS HTML FILE AS YOUR TEMPLATE! <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" /> <title>PEP 100 -- Test PEP</title> - <link rel="stylesheet" href="../../../docutils/writers/support/pep_html/pep.css" type="text/css" /> + <link rel="stylesheet" href="../../../docutils/writers/pep_html/pep.css" type="text/css" /> </head> <body bgcolor="white"> <table class="navigation" cellpadding="0" cellspacing="0" diff --git a/test/functional/expected/standalone_rst_html4css1.html b/test/functional/expected/standalone_rst_html4css1.html index 6f2fbb49c..e5103d543 100644 --- a/test/functional/expected/standalone_rst_html4css1.html +++ b/test/functional/expected/standalone_rst_html4css1.html @@ -12,7 +12,7 @@ <meta name="copyright" content="This document has been placed in the public domain. You may do with it as you wish. You may copy, modify, redistribute, reattribute, sell, buy, rent, lease, destroy, or improve it, quote it at length, excerpt, incorporate, collate, fold, staple, or mutilate it, or do anything else to it that your or anyone else's heart desires." /> <meta content="reStructuredText, test, parser" name="keywords" /> <meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" /> -<link rel="stylesheet" href="../../../docutils/writers/support/html4css1.css" type="text/css" /> +<link rel="stylesheet" href="../../../docutils/writers/html4css1/html4css1.css" type="text/css" /> </head> <body> <div class="header"> diff --git a/test/functional/expected/standalone_rst_s5_html_1.html b/test/functional/expected/standalone_rst_s5_html_1.html index 58865ce3c..ab7b2d5bc 100644 --- a/test/functional/expected/standalone_rst_s5_html_1.html +++ b/test/functional/expected/standalone_rst_s5_html_1.html @@ -8,7 +8,7 @@ <title>Slide Shows</title> <meta name="author" content="David Goodger" /> <meta name="date" content="2005-11-28" /> -<link rel="stylesheet" href="../../../docutils/writers/support/html4css1.css" type="text/css" /> +<link rel="stylesheet" href="../../../docutils/writers/html4css1/html4css1.css" type="text/css" /> <!-- configuration parameters --> <meta name="defaultView" content="slideshow" /> <meta name="controlVis" content="hidden" /> diff --git a/test/functional/expected/standalone_rst_s5_html_2.html b/test/functional/expected/standalone_rst_s5_html_2.html index 18e23f83e..029eeeb7c 100644 --- a/test/functional/expected/standalone_rst_s5_html_2.html +++ b/test/functional/expected/standalone_rst_s5_html_2.html @@ -8,7 +8,7 @@ <title>Slide Shows</title> <meta name="author" content="David Goodger" /> <meta name="date" content="2005-11-28" /> -<link rel="stylesheet" href="../../../docutils/writers/support/html4css1.css" type="text/css" /> +<link rel="stylesheet" href="../../../docutils/writers/html4css1/html4css1.css" type="text/css" /> <!-- configuration parameters --> <meta name="defaultView" content="slideshow" /> <meta name="controlVis" content="hidden" /> diff --git a/tools/docutils.conf b/tools/docutils.conf index dbe42e14a..769269340 100644 --- a/tools/docutils.conf +++ b/tools/docutils.conf @@ -6,6 +6,6 @@ generator: on [html4css1 writer] # These entries affect HTML output: -stylesheet-path: ../docutils/writers/support/html4css1.css +stylesheet-path: ../docutils/writers/html4css1/html4css1.css embed-stylesheet: no field-name-limit: 20 |
