diff options
| author | armin.ronacher <devnull@localhost> | 2008-06-26 11:11:20 +0000 |
|---|---|---|
| committer | armin.ronacher <devnull@localhost> | 2008-06-26 11:11:20 +0000 |
| commit | cfa70d34c113be118125500c21e898ce7dc5bdad (patch) | |
| tree | bb6d7e7104daffe8cbb63ae708be580741d1bdc4 /doc/builders.rst | |
| parent | 743c3fcf5a09849bfb4bc2e18cfdf1e481d9233f (diff) | |
| download | sphinx-cfa70d34c113be118125500c21e898ce7dc5bdad.tar.gz | |
Implemented JSONHTMLBuilder and improved JSON handling (it now prefers json from the 2.6 stdlib or simplejson).
Diffstat (limited to 'doc/builders.rst')
| -rw-r--r-- | doc/builders.rst | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/doc/builders.rst b/doc/builders.rst index 2d6a61c1..02f30f4a 100644 --- a/doc/builders.rst +++ b/doc/builders.rst @@ -34,8 +34,7 @@ The builder's "name" must be given to the **-b** command-line option of This builder produces a directory with pickle files containing mostly HTML fragments and TOC information, for use of a web application (or custom - postprocessing tool) that doesn't use the standard HTML templates. It also - is the format used by the Sphinx Web application. + postprocessing tool) that doesn't use the standard HTML templates. See :ref:`serialization-details` for details about the output format. @@ -44,6 +43,21 @@ The builder's "name" must be given to the **-b** command-line option of The file suffix is ``.fpickle``. The global context is called ``globalcontext.pickle``, the search index ``searchindex.pickle``. +.. class:: JSONHTMLBuilder + + This builder produces a directory with JSON files containing mostly HTML + fragments and TOC information, for use of a web application (or custom + postprocessing tool) that doesn't use the standard HTML templates. + + See :ref:`serialization-details` for details about the output format. + + Its name is ``json``. + + The file suffix is ``.fjson``. The global context is called + ``globalcontext.json``, the search index ``searchindex.json``. + + .. versionadded:: 0.5 + .. class:: LaTeXBuilder This builder produces a bunch of LaTeX files in the output directory. You @@ -70,17 +84,19 @@ The builder's "name" must be given to the **-b** command-line option of (`pickle`, `simplejson`, `phpserialize`, and others) to dump the generated HTML documentation. The pickle builder is a subclass of it. - A concreate subclass of this builder serializing to JSON could look like - this:: + A concreate subclass of this builder serializing to the `PHP serialization`_ + format could look like this:: + + import phpserialize - import simplejson + classs PHPSerializedBuilder(SerializingHTMLBuilder): + name = 'phpserialized' + implementation = phpserialize + out_suffix = '.file.phpdump' + globalcontext_filename = 'globalcontext.phpdump' + searchindex_filename = 'searchindex.phpdump' - classs JSONBuilder(SerializingHTMLBuilder): - name = 'json' - implementation = simplejson - out_suffix = '.fjson' - globalcontext_filename = 'globalcontext.json' - searchindex_filename = 'searchindex.json' + .. _PHP serialization: http://pypi.python.org/pypi/phpserialize .. attribute:: implementation |
