文件操作 - core.cpython-311.pyc
返回文件管理
返回主菜单
删除本文件
文件: /usr/lib/python3/dist-packages/docutils/__pycache__/core.cpython-311.pyc
编辑文件内容
� �b�x � �| � d Z dZddlZddlZddlZddlZddlmZmZm Z m Z mZmZm Z ddlmZ ddlmZ G d� d� � Zd Zd Zdddddd ddddddeefd�Z dd�Z dd�Zde j ddddddd dddddfd�Zde j dddddddddfd�Z dd�Zdddddd ddddddeede j fd�Zd� ZdS )a� Calling the ``publish_*`` convenience functions (or instantiating a `Publisher` object) with component names will result in default behavior. For custom behavior (setting component options), create custom component objects first, and pass *them* to ``publish_*``/`Publisher`. See `The Docutils Publisher`_. .. _The Docutils Publisher: https://docutils.sourceforge.io/docs/api/publisher.html �reStructuredText� N)�__version__�__version_details__�SettingsSpec�io�utils�readers�writers)�OptionParser)�doctreec �� � e Zd ZdZddddej dej dfd�Zd� Zd� Z d� Z dd�Zd� Z dd �Z d � Z dd�Zdd�Zdd �Zdd�Zd� Z dd�Zd� Zd� Zd� Zd� Zd� ZdS )� PublisherzK A facade encapsulating the high-level logic of a Docutils system. Nc �Z � d| _ || _ || _ || _ dD ]G} t t | | � � t � � r"J dt | | � � �d| �d| �d�� � ��H|| _ || _ || _ || _ || _ t j � � | _ dS )z� Initial setup. If any of `reader`, `parser`, or `writer` are not specified, the corresponding ``set_...`` method should be called with a component name (`set_reader` sets the parser as well). N)�reader�parser�writerzpassed string "z" as "z+" parameter; pass an instance, or use the "zL_name" parameter instead (in docutils.core.publish_* convenience functions).)�documentr r r � isinstance�getattr�str�source�source_class�destination�destination_class�settingsr �ErrorOutput�_stderr) �selfr r r r r r r r � components �//usr/lib/python3/dist-packages/docutils/core.py�__init__zPublisher.__init__# s� � � �� �;����3����3����3�5� D� D�I�!�'�$� �":�":�C�@�@� D� D� D� �4��+�+�+�+�Y�Y�Y� � � �C� D� D� D� D� ���G�(���?�&��� � "3���D� �� � J� �~�'�'����� c �r � t j |� � } |||� � | _ | j j | _ dS )zSet `self.reader` by name.N)r �get_reader_classr r )r �reader_namer �parser_name�reader_classs r � set_readerzPublisher.set_readerS s5 � ��/��<�<��"�l�6�;�7�7����k�(����r"