HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/docutils/writers/__pycache__/__init__.cpython-310.pyc
o

!5p`��@s�dZdZddlZddlZddlmZddlZddlmZm	Z	ddl
mZGdd�de	�ZGd	d
�d
e�Z
idd�d
d�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d!�d"d!�d#d$d%��Zd&d'�ZdS)(z0
This package contains Docutils Writer modules.
�reStructuredText�N)�
import_module)�	languages�	Component)�	universalc@sXeZdZdZdZdZdd�ZdZ	dZ	dZ		dZ
	dd�Zd	d
�Zdd�Z
d
d�ZdS)�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�writerscCst�|�tjtjtjgS�N)r�get_transformsr�Messages�FilterMessages�StripClassesAndElements��self�r�;/usr/lib/python3/dist-packages/docutils/writers/__init__.pyr"s
�zWriter.get_transformsNcCs
i|_dSr
)�partsrrrr�__init__6szWriter.__init__cCs:||_t�|jj|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)rrrrrrrr?s
�zWriter.writecCstd��)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)�NotImplementedErrorrrrrrRszWriter.translatecCs,|j|jd<|jjj|jd<tj|jd<dS)z<Assemble the `self.parts` dictionary.  Extend in subclasses.�whole�encoding�versionN)rrrr�output_encoding�docutils�__version__rrrr�assemble_parts`szWriter.assemble_parts)�__name__�
__module__�__qualname__�__doc__�component_type�config_sectionrrrrrrrrr&rrrrrs"
	rc@seZdZdZdd�ZdS)�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`.
    cCs
t�|�Sr
)rrrrrrrqs
zUnfilteredWriter.get_transformsN)r'r(r)r*rrrrrr-gsr-�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
Cst|��}|tvrt|}z
td|�}W|jSty9z	t|�}WY|jSty8}ztd|��d}~www)z6Return the Writer class from the `writer_name` module.zdocutils.writers.zNo writer named "%s".N)�lower�_writer_aliasesr�ImportErrorr)�writer_name�module�errrrr�get_writer_class�s�����rP)r*�
__docformat__�os.path�os�sys�	importlibrr$rr�docutils.transformsrrr-rKrPrrrr�<module>sbT��������	�
���
������