mò iã¸Ec@sbdZdklZlZdddddd„Zddddddd„Zdddd„ZdS(s1 This module contains practical examples of Docutils client code. Importing this module from client code is not recommended; its contents are subject to change in future Docutils releases. Instead, it is recommended that you copy and paste the parts you need into your own code, modifying as necessary. (scoresiotunicodeic CsOhd|<d|<d|<}tid|d|d|ddd |ƒ}|S( s Given an input string, returns a dictionary of HTML document parts. Dictionary keys are the names of parts, and values are Unicode strings; encoding is up to the client. Parameters: - `input_string`: A multi-line text string; required. - `source_path`: Path to the source file or object. Optional, but useful for diagnostic output (system messages). - `destination_path`: Path to the file or object which will receive the output; optional. Used for determining relative paths (stylesheets, source links, etc.). - `input_encoding`: The encoding of `input_string`. If it is an encoded 8-bit string, provide the correct encoding. If it is a Unicode string, use "unicode", the default. - `doctitle`: Disable the promotion of a lone top-level section title to document title (and subsequent section title to document subtitle promotion); enabled by default. - `initial_header_level`: The initial level for header elements (e.g. 1 for "

"). tinput_encodingtdoctitle_xformtinitial_header_leveltsourcet source_pathtdestination_patht writer_namethtmltsettings_overridesN( RtdoctitleRt overridestcoret publish_partst input_stringRRtparts(RRRRR RRR ((t0/data/zmath/zope/lib/python/docutils/examples.pyt html_partss !c Cs[td|d|d|d|d|d|ƒ}|d}|djo|i |ƒ}n|S( sE Given an input string, returns an HTML fragment as a string. The return value is the contents of the element. Parameters (see `html_parts()` for the remainder): - `output_encoding`: The desired encoding of the output. If a Unicode string is desired, use the default value of "unicode" . RRRRR Rt html_bodyRN( RRRRRR RRtfragmenttoutput_encodingtencode( RRRRRR RRR((RR5s     c#Cshd|<}tidtid|d|dtiddd|ddd d d dd d ddddddddd|ddddƒ\}}|i i|fS(sx Return the document tree and publisher, for exploring Docutils internals. Parameters: see `html_parts()`. Rt source_classRRtdestination_classt destinationRtreadert reader_namet standalonetparsert parser_nametrestructuredtexttwriterRtnulltsettingst settings_specR tconfig_sectiontenable_exit_statusN(RR R tpublish_programmaticallytiot StringInputRRt NullOutputtNoneRtoutputtpubRtdocument(RRRRR R+R*((Rt internalsLs   N(t__doc__tdocutilsR R&R)RRR-(R R-RR&R((Rt?s"