← Back
Editing: __init__.cpython-311.pyc
� N=&b� � �� � d Z dZddlmZ ddlZddlmZmZ ddlmZ G d� de� � Z G d � d e � � Z i dd�d d�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d!�d"d!�d#d$d%��Zd&� ZdS )'z0 This package contains Docutils Writer modules. �reStructuredText� )� import_moduleN)� languages� Component)� universalc �P � e Zd ZdZdZdZd� ZdZ dZ dZ dZ d� Zd� Zd� Z 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�writersc �r � t j | � � t j t j t j gz S �N)r �get_transformsr �Messages�FilterMessages�StripClassesAndElements��selfs �;/usr/lib/python3/dist-packages/docutils/writers/__init__.pyr zWriter.get_transforms! s1 � ��'��-�-��%��+��4�16� 6� 6� Nc � � i | _ d S r )�partsr s r �__init__zWriter.__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"