§
    N=&bÏ  ã                   óð   — d Z dZddlmZ ddlZddlmZmZ ddlmZ  G d„ de¦  «        Z	 G d	„ d
e	¦  «        Z
i dd“dd“dd“dd“dd“dd“dd“dd“dd“dd“dd“dd“dd“dd“dd“d d!“d"d!“d#d$d%œ¥Zd&„ ZdS )'z0
This package contains Docutils Writer modules.
ÚreStructuredTexté    )Úimport_moduleN)Ú	languagesÚ	Component)Ú	universalc                   óP   — e Zd ZdZdZdZd„ ZdZ	 dZ	 dZ		 dZ
	 d„ Zd„ Zd„ Zd	„ ZdS )
ÚWritera  
    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.
    ÚwriterÚwritersc                 ór   — t          j        | ¦  «        t          j        t          j        t          j        gz   S ©N)r   Úget_transformsr   ÚMessagesÚFilterMessagesÚStripClassesAndElements©Úselfs    ú;/usr/lib/python3/dist-packages/docutils/writers/__init__.pyr   zWriter.get_transforms!   s1   € ÝÔ'¨Ñ-Ô-ÝÔ%ÝÔ+ÝÔ4ð16ñ 6ð 	6ó    Nc                 ó   — i | _         d S r   )Úpartsr   s    r   Ú__init__zWriter.__init__5   s   € ð ˆŒ
ð	ð 	r   c                 óÖ   — || _         t          j        |j        j        |j        ¦  «        | _        || _        |                      ¦   «          | j         	                    | j
        ¦  «        S )a/  
        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.
        )Údocumentr   Úget_languageÚsettingsÚlanguage_codeÚreporterÚlanguageÚdestinationÚ	translateÚwriteÚoutput)r   r   r    s      r   r"   zWriter.write>   sa   € ð !ˆŒÝ!Ô.ØÔÔ+ØÔñô ˆŒð 'ˆÔØ�ŠÑÔÐØÔ×%Ò% d¤kÑ2Ô2Ð2r   c                 ó    — t          d¦  «        ‚)a  
        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.
        z"subclass must override this method)ÚNotImplementedErrorr   s    r   r!   zWriter.translateP   s   € õ "Ð"FÑGÔGÐGr   c                 ó~   — | j         | j        d<   | j        j        j        | j        d<   t
          j        | j        d<   dS )z<Assemble the `self.parts` dictionary.  Extend in subclasses.ÚwholeÚencodingÚversionN)r#   r   r   r   Úoutput_encodingÚdocutilsÚ__version__r   s    r   Úassemble_partszWriter.assemble_parts^   s9   € à"œkˆŒ
�7ÑØ!%¤Ô!7Ô!GˆŒ
�:ÑÝ (Ô 4ˆŒ
�9ÑÐÐr   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úcomponent_typeÚconfig_sectionr   r   r#   r   r    r   r"   r!   r-   © r   r   r	   r	      s    € € € € € ðð ð €NØ€Nð6ð 6ð 6ð €HØCà€Fð4ð €HØ;à€Kððð ð ð3ð 3ð 3ð$Hð Hð Hð5ð 5ð 5ð 5ð 5r   r	   c                   ó   — e Zd ZdZd„ ZdS )ÚUnfilteredWriterzÓ
    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`.
    c                 ó*   — t          j        | ¦  «        S r   )r   r   r   s    r   r   zUnfilteredWriter.get_transformso   s   € õ Ô'¨Ñ-Ô-Ð-r   N)r.   r/   r0   r1   r   r4   r   r   r6   r6   e   s-   € € € € € ðð ð.ð .ð .ð .ð .r   r6   ÚhtmlÚ	html4css1Úhtml4Úxhtml10Úhtml5Úhtml5_polyglotÚxhtmlÚs5Ús5_htmlÚlatexÚlatex2eÚxelatexÚxetexÚluatexÚlualatexÚodfÚodf_odtÚodtÚoofficeÚ
openofficeÚlibreofficeÚpprintÚ	pseudoxmlÚpformatÚrlpdfÚdocutils_xml)ÚpdfÚxmlc                 ó&  — |                       ¦   «         }t                               ||¦  «        }	 t          d|z   ¦  «        }nH# t          $ r; 	 t          |¦  «        }n'# t          $ r}t	          d| › d|› �¦  «        ‚d}~ww xY wY nw xY w|j        S )z6Return the Writer class from the `writer_name` module.zdocutils.writers.zWriter "z" not found. N)ÚlowerÚ_writer_aliasesÚgetr   ÚImportErrorr	   )Úwriter_nameÚnameÚmoduleÚerrs       r   Úget_writer_classr]   Œ   sÊ   € à×ÒÑÔ€DÝ×Ò˜t TÑ*Ô*€DðJÝÐ2°4Ñ7Ñ8Ô8ˆˆøÝð Jð Jð Jð	JÝ" 4Ñ(Ô(ˆFˆFøÝð 	Jð 	Jð 	JÝÐH¨ÐHÐHÀ3ÐHÐHÑIÔIÐIøøøøð	Jøøøð ˆFðJøøøð
 Œ=Ðs5   ±A Á
B	ÁAÁB	Á
BÁ)A>Á>BÂB	ÂB	)r1   Ú__docformat__Ú	importlibr   r+   r   r   Údocutils.transformsr   r	   r6   rV   r]   r4   r   r   ú<module>ra      s¹  ðð
ð ð #€à #Ð #Ð #Ð #Ð #Ð #à €€€Ø )Ð )Ð )Ð )Ð )Ð )Ð )Ð )Ø )Ð )Ð )Ð )Ð )Ð )ðP5ð P5ð P5ð P5ð P5ˆYñ P5ô P5ð P5ðf.ð .ð .ð .ð .�vñ .ô .ð .ð"Øˆkðàˆ{ðð �ðð Ðð	ð
 Ððð ˆIðð ˆyðð �ðð �ðð �'ðð ˆYðð ˆYðð �ðð �Iðð �Yðð  �ð!ð" �ð#ð$ Øð'ð ð €ð,ð ð ð ð r   