Your IP : 216.73.216.213


Current Path : /opt/alt/python27/lib/python2.7/site-packages/docutils/writers/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/docutils/writers/__init__.pyc

�
0+�Wc@sdZdZddlZddlZddlZddlmZmZddlm	Z	ej
d"krxddlmZnd	efd
��YZ
de
fd��YZid
d6d
d6dd6dd6dd6dd6dd6dd6dd6dd6d
d6dd 6Zd!�ZdS(#s0
This package contains Docutils Writer modules.
treStructuredTexti����N(t	languagest	Component(t	universalii(t
__import__tWritercBs_eZdZdZdZd�ZdZdZdZ	dZ
d�Zd�Zd�Z
d�ZRS(	s
    Abstract base class for docutils Writers.

    Each writer module or package must export a subclass also called 'Writer'.
    Each writer must support all standard node types listed in
    `docutils.nodes.node_class_names`.

    The `write()` method is the main entry point.
    twritertwriterscCs#tj|�tjtjtjgS(N(Rtget_transformsRtMessagestFilterMessagestStripClassesAndElements(tself((sJ/opt/alt/python27/lib/python2.7/site-packages/docutils/writers/__init__.pyR$scCs
i|_dS(N(tparts(R((sJ/opt/alt/python27/lib/python2.7/site-packages/docutils/writers/__init__.pyt__init__8s	cCsS||_tj|jj|j�|_||_|j�|jj	|j
�}|S(s/
        Process a document into its final form.

        Translate `document` (a Docutils document tree) into the Writer's
        native format, and write it out to its `destination` (a
        `docutils.io.Output` subclass object).

        Normally not overridden or extended in subclasses.
        (tdocumentRtget_languagetsettingst
language_codetreportertlanguagetdestinationt	translatetwritetoutput(RRRR((sJ/opt/alt/python27/lib/python2.7/site-packages/docutils/writers/__init__.pyRAs
			
cCstd��dS(s
        Do final translation of `self.document` into `self.output`.  Called
        from `write`.  Override in subclasses.

        Usually done with a `docutils.nodes.NodeVisitor` subclass, in
        combination with a call to `docutils.nodes.Node.walk()` or
        `docutils.nodes.Node.walkabout()`.  The ``NodeVisitor`` subclass must
        support all standard elements (listed in
        `docutils.nodes.node_class_names`) and possibly non-standard elements
        used by the current Reader as well.
        s"subclass must override this methodN(tNotImplementedError(R((sJ/opt/alt/python27/lib/python2.7/site-packages/docutils/writers/__init__.pyRTscCs:|j|jd<|jjj|jd<tj|jd<dS(s<Assemble the `self.parts` dictionary.  Extend in subclasses.twholetencodingtversionN(RR
RRtoutput_encodingtdocutilst__version__(R((sJ/opt/alt/python27/lib/python2.7/site-packages/docutils/writers/__init__.pytassemble_partsbsN(t__name__t
__module__t__doc__tcomponent_typetconfig_sectionRtNoneRRRRRRRR (((sJ/opt/alt/python27/lib/python2.7/site-packages/docutils/writers/__init__.pyRs
					tUnfilteredWritercBseZdZd�ZRS(s�
    A writer that passes the document tree on unchanged (e.g. a
    serializer.)

    Documents written by UnfilteredWriters are typically reused at a
    later date using a subclass of `readers.ReReader`.
    cCs
tj|�S(N(RR(R((sJ/opt/alt/python27/lib/python2.7/site-packages/docutils/writers/__init__.pyRss(R!R"R#R(((sJ/opt/alt/python27/lib/python2.7/site-packages/docutils/writers/__init__.pyR'ist	html4css1thtmlthtml4thtml5_polyglotthtml5tlatex2etlatext	pseudoxmltpprinttpformattrlpdftpdfts5_htmlts5txetextxelatextxhtmltxhtml10tdocutils_xmltxmlcCs�|j�}|tkr%t|}ny"t|t�t�dd�}Wn/tk
rxt|t�t�dd�}nX|jS(s6Return the Writer class from the `writer_name` module.tlevelii(tlowert_writer_aliasesRtglobalstlocalstImportErrorR(twriter_nametmodule((sJ/opt/alt/python27/lib/python2.7/site-packages/docutils/writers/__init__.pytget_writer_class�s
"
"(ii(R#t
__docformat__tos.pathtostsysRRRtdocutils.transformsRtversion_infotdocutils._compatRRR'R>RD(((sJ/opt/alt/python27/lib/python2.7/site-packages/docutils/writers/__init__.pyt<module>s0T