
    -Ph                        d Z dZddlZddlZddlZddlZddlZddlmZm	Z	m
Z
mZmZmZmZ ddlmZ ddlmZ  G d d          Zd	Zd
ZddddddddddddeefdZ	 	 	 	 	 	 	 d$dZ	 	 	 	 	 	 	 d%dZdej        ddddddddddddfdZdej        dddddddddfdZ	 	 	 	 	 d&dZddddddddddddeedej        fdZd Zd'dZ d Z!d Z"d Z#d Z$d Z%d Z&d  Z'd! Z(d" Z)d# Z*dS )(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 Zd ZdZddddej        dej        dfdZd Zd Z	d Z
	 	 ddZd Z	 	 dd	Zd
 Z	 	 ddZddZddZddZd Z	 	 	 ddZd Zd Zd Zd Zd ZdS )	PublisherzK
    A facade encapsulating the high-level logic of a Docutils system.
    Nc	           	      Z   d| _         	 || _        	 || _        	 || _        	 dD ]G}	t	          t          | |	          t                    r"J dt          | |	          d|	d|	d            H|| _        	 || _        	 || _	        	 || _
        	 || _        	 t          j                    | _        dS )a  
        Initial setup.  If any of `reader`, `parser`, or `writer` are not
        specified, ``set_components()`` or the corresponding ``set_...()``
        method should be called with component names
        (`set_reader` sets the parser as well).
        N)readerparserwriterzpassed 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
             M/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/docutils/core.py__init__zPublisher.__init__$   s     ;3335 	D 	DI!'$	":":C@@ D D D 4++++YYY			CD D D D G(?&	 "3D 	J ~''    c                 r    t          j        |          } |||          | _        | j        j        | _        dS )zSet `self.reader` by name.N)r	   get_reader_classr   r   )r   reader_namer   parser_namereader_classs        r    
set_readerzPublisher.set_readerU   s5    /<<"l6;77k(r"   c                 L    t          j        |          } |            | _        dS )zSet `self.writer` by name.N)r
   get_writer_classr   )r   writer_namewriter_classs      r    
set_writerzPublisher.set_writer[   s#    /<<"lnnr"   c                    | j         |                     || j        |           | j        7| j         j        | j                             |           | j         j        | _        | j        |                     |           d S d S N)r   r(   r   
set_parserr   r-   )r   r%   r&   r+   s       r    set_componentszPublisher.set_components`   s    ;OOKkBBB;{!)&&{333+,DK;OOK((((( r"   c                 0   t          j        dt          d           |rR|st                      }||_        |                                }t          |          dk    r|d         dk    rdg|_        t          | j	        | j
        | j        |f|d||	          S )
NzRPublisher.setup_option_parser is deprecated, and will be removed in Docutils 0.21.   )
stacklevel   applicationapplicationsT)
componentsdefaultsread_config_filesusagedescription)warningswarnDeprecationWarningr   config_sectionsplitlenconfig_section_dependenciesr   r   r   r   )r   r<   r=   settings_specrA   r:   partss          r    setup_option_parserzPublisher.setup_option_parserj   s     	 >(Q	8 	8 	8 	8  	M  / ,+9M("((**E5zzA~~%)}"<"<=K<L9T[$+}M[2 2 2 	2r"   c                     t          j                    5  t          j        dt                      | j        |i |cd d d            S # 1 swxY w Y   d S )Nignore)category)r>   catch_warningsfilterwarningsr@   rG   )r   argskwargss      r    _setup_settings_parserz Publisher._setup_settings_parser}   s     $&& 	= 	=#H7IJJJJ+4+T<V<<	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	=s   (A		AAc                 d     | j         ||||fi |}|                                | _        | j        S )a  
        Return settings from components and config files.

        Please set components first (`self.set_reader` & `self.set_writer`).
        Use keyword arguments to override component defaults
        (before updating from configuration files).

        Calling this function also sets `self.settings` which makes
        `self.publish()` skip parsing command line options.
        )rO   get_default_valuesr   )r   r<   r=   rE   rA   r:   option_parsers          r    get_settingszPublisher.get_settings   sM     43;~K KAIK K%88::}r"   c                     | j         @|r|                                ni }|                    dd            | j        d||d| d S d S )N	tracebackT)rE   rA    )r   copy
setdefaultrS   )r   rE   settings_overridesrA   r:   s        r    process_programmatic_settingsz'Publisher.process_programmatic_settings   s~     = 4FN)..000BHT222D *M-;* * (* * * * *	 ! r"   c                      | j         ||||fi |}|t          j        dd         }|                    |          | _        dS )z
        Parse command line arguments and set ``self.settings``.

        Pass an empty sequence to `argv` to avoid reading `sys.argv`
        (the default behaviour).

        Set components first (`self.set_reader` & `self.set_writer`).
        Nr5   )rO   sysargv
parse_argsr   )r   r]   r<   r=   rE   rA   r:   rR   s           r    process_command_linezPublisher.process_command_line   s_     43;~K KAIK K<8ABB<D%0066r"   c                 ~    | j         |                     |           | j        |                     |           d S d S )N)source_path)destination_path)r   
set_sourcer   set_destination)r   ra   rb   s      r    set_iozPublisher.set_io   sM    ;OOO444#  2B CCCCC $#r"   c                     || j         j        }n|| j         _        |                     ||| j         j        | j         j                  | _        d S )N)r   ra   encodingerror_handler)r   _sourcer   input_encodinginput_encoding_error_handlerr   )r   r   ra   s      r    rc   zPublisher.set_source   sU    -/KK$/DM!''{]1-D ( F Fr"   c                 p   |u| j         j        r5| j         j        r)| j         j        | j         j        k    rt          d          | j         j        dk    rd | j         _        | j         j        p| j         j        }|| j         _        |                     ||| j         j        | j         j                  | _        d S )NziThe positional argument <destination> is obsoleted by the --output option.  You cannot use them together.-)r   rb   rg   rh   )r   output_destination
SystemExitr   output_encodingoutput_encoding_error_handlerr   )r   r   rb   s      r    rd   zPublisher.set_destination   s    #$ B)C BM(DM,FFF  "A B B B }#s**'+$ $ 4 !>#'=#= %5"11#-]2-E	 2 G Gr"   c                     | j         j                            | j        | j        | j        j        | j        | j        f           | j         j                                         d S r/   )	r   transformerpopulate_from_componentsr   r   r   r   r   apply_transformsr   s    r    rv   zPublisher.apply_transforms   s]    !::[$+t{'94;	  	  	  	!2244444r"   Fc                 r   d}	 | j          | j        |||||fi |pi  |                                  |                                  | j                            | j        | j        | j                   | _        | 	                                 | j
                            | j        | j                  }	| j
                                         nt# t          $ r}
d}|
j        }Y d}
~
n\d}
~
wt           $ rL}
| j         s | j         j        r|                                   |                     |
           d}d}Y d}
~
nd}
~
ww xY w|                                  |rM| j        rF| j        j        j        | j         j        k    r't/          j        | j        j        j        dz              n|rt/          j        |           |	S )z
        Process command line options and arguments (if `self.settings` not
        already set), run `self.reader` and then `self.writer`.  Return
        `self.writer`'s output.
        NTr5   
   )r   r_   re   promptr   readr   r   r   rv   r   writer   assemble_partsrp   code	ExceptionrU   debugging_dumpsreport_Exceptionreporter	max_levelexit_status_levelr\   exit)r   r]   r<   r=   rE   rY   rA   enable_exit_statusr   rn   errorexit_statuss               r    publishzPublisher.publish   s    	}$))%m^2 2)/R2 2 2 KKMMMKKMMM K,,T[$+-1]< <DM!!###[&&t}d6FGGFK&&(((( 	% 	% 	%D*KKKKKK 	 	 	= }& $$&&&!!%(((DKKKKKK	 	 	"4= 	"'1M34 4HT]+5:;;;; 	"H[!!!s%   CC
 

D;	C""D;/AD66D;c                 "   | j         sd S | j        j        rHt          d| j                   t          t          j        | j        j                  | j                   | j        j        rHt          d| j                   t          t          j        | j         j                  | j                   | j        j	        rmt          d| j                   t          d| j                   t          t          j        d | j         j
        j        D                       | j                   | j        j        rXt          d| j                   t          | j                                                             d          | j                   d S d S )	Nz
::: Runtime settings:filez
::: Document internals:z
::: Transforms applied:z@ (priority, transform class, pending node details, keyword args)c                 P    g | ]#\  }}}}||j         d |j        |o|j        |f$S ).)
__module____name__details).0priorityxclasspendingrN   s        r    
<listcomp>z-Publisher.debugging_dumps.<locals>.<listcomp>  sU     7 7 76Xvw v'8'8'8&//J-gov7 7 7 7r"   z
::: Pseudo-XML:raw_unicode_escape)r   r   dump_settingsprintr   pprintpformat__dict__dump_internalsdump_transformsrt   applieddump_pseudo_xmlencoderw   s    r    r   zPublisher.debugging_dumps  s   } 	F=& 	M+$,????&.!788t|LLLL=' 	M-DLAAAA&.!788t|LLLL=( 	L-DLAAAA "(,6 6 6 6&.7 7 M-57 7 78 8 ?Cl	L L L L
 =( 	:%DL9999$-''))00$& &,0L: : : : : :	: 	:r"   c                    	 | j                                         r| j                                        sdS n# t          $ r Y dS w xY wt          j        dk    rdnd}d}d}	 | j        j        d         }| j        j        d         }n# t          t          f$ r Y nw xY wt          dt           d	| d
| d| d	| j                   dS )z=Print info and prompt when waiting for input from a terminal.NntzCtrl+ZzCtrl+D zuseful formatsr   z	Docutils z/ <https://docutils.sourceforge.io>
converting "z" into "zT".
Call with option "--help" for more info.
.. Waiting for source text (finish with z on an empty line):r   )r   isattyr   AttributeErrorosnamer   	supportedr   
IndexErrorr   r   )r   eot_key	in_format
out_formats       r    rz   zPublisher.prompt  s-   	K&&(( T\-@-@-B-B  	 	 	FF	 goo((8	%
	-a0I.q1JJ
+ 	 	 	D	 #+ # #&# #0:# # :A# # #
 <	! 	! 	! 	! 	! 	!s!   27 
AA!$B BBc                    t          |t          j                  r|                     |           d S t          |t                    r|                     |           d S t          |t          j                  r1| j        	                    dt          j
        |          z             d S t          |t          j                  r1| j        	                    dt          j
        |          z             d S t          dt          j
        |          z  | j                   t          dt           t          rdt           dnd d	t          j                                        d
          d| j                   d S )Nz-Unable to open source file for reading:
  %s
z2Unable to open destination file for writing:
  %s
z%sr   zExiting due to error.  Use "--traceback" to diagnose.
Please report errors to <docutils-users@lists.sourceforge.net>.
Include "--traceback" output, Docutils version (z []r   ),
Python version (r   z5), your OS type & version, and the command line used.)r   r   SystemMessagereport_SystemMessageUnicodeEncodeErrorreport_UnicodeErrorr   
InputErrorr   r|   error_stringOutputErrorr   r   r   r\   versionrB   r   r   s     r    r   zPublisher.report_Exception1  s   eU011 	2%%e,,,,,122 	2$$U+++++r}-- 	2L  (*,/%*@*@ A B B B B Br~.. 	2L?51123 3 3 3 3 $///dlCCCC  2= !4;	 
 ""$$Q'   %)L2 2 2 2 2 2r"   c                 ~    t          d|j        dt          j        j        |j                 d| j                   d S )NzExiting due to level-z (z) system message.r   )r   levelr   Reporterlevelsr   r   s     r    r   zPublisher.report_SystemMessageG  sM    +++u~4U[AAAC<	! 	! 	! 	! 	! 	!r"   c                    |j         |j        |j                 }| j                            t          j        |          d| j        j        d|	                    dd          d|	                    dd          d| j        j
        dt          d	t          j                                        d
         d           d S )Nz!

The specified output encoding (z) cannot
handle all of the output.
Try setting "--output-encoding-error-handler" to

* "xmlcharrefreplace" (for HTML & XML output);
  the output will contain "asciixmlcharrefreplacezU" and should be usable.
* "backslashreplace" (for other output formats);
  look for "backslashreplacezr" in the output.
* "replace"; look for "?" in the output.

"--output-encoding-error-handler" is currently set to "z".

Exiting due to error.  Use "--traceback" to diagnose.
If the advice above doesn't eliminate the error,
please report it to <docutils-users@lists.sourceforge.net>.
Include "--traceback" output, Docutils version (r   r   z6), your OS type & version, and the
command line used.
)objectstartendr   r|   r   r   r   rq   r   rr   r   r\   r   rB   )r   r   datas      r    r   zPublisher.report_UnicodeErrorL  s    |EK	12* u%%%%},,,{{7$78888{{7$67777}:::{{CK--//22234	5 	5 	5 	5 	5r"   )NNNN)NNNNN)NN)NNNNNNF)r   r   __qualname____doc__r   	FileInput
FileOutputr!   r(   r-   r1   rG   rO   rS   rZ   r_   re   rc   rd   rv   r   r   rz   r   r   r   rV   r"   r    r   r      s         #42<!R]/( /( /( /(b) ) )% % %
) ) ) ;??C2 2 2 2&= = = 488<   "	* 	* 	* GK@D7 7 7 7"D D D DF F F FG G G G$5 5 5 :>7;8=( ( ( (T: : :.! ! !,2 2 2,! ! !
5 5 5 5 5r"   r   z*%prog [options] [<source> [<destination>]]zReads from <source> (default is stdin) and writes to <destination> (default is stdout).  See https://docutils.sourceforge.io/docs/user/config.html for a detailed settings reference.
standalonerestructuredtext	pseudoxmlTc           	          t          | |||          }|                    |||           |                    ||||||	|
          }|S )aT  
    Set up & run a `Publisher` for command-line-based file I/O (input and
    output file paths taken automatically from the command line).
    Also return the output as `str` or `bytes` (for binary output document
    formats).

    Parameters: see `publish_programmatically()` for the remainder.

    - `argv`: Command-line argument list to use instead of ``sys.argv[1:]``.
    - `usage`: Usage string, output if there's a problem parsing the command
      line.
    - `description`: Program description, output for the "--help" option
      (along with command-line option descriptions).
    )r   rA   r   r   r1   r   )r   r%   r   r&   r   r+   r   rE   rY   rA   r   r]   r<   r=   	publisherrn   s                   r    publish_cmdliner   {  sg    * &&&8DDDI[+{CCCe[-1C%:L  N NF Mr"   Fc                     t          di dt          j        d| d|dt          j        d|d|d|d|d	|d
|d|d|	d|
d|d|d|d|\  }}|S )z
    Set up & run a `Publisher` for programmatic use with file-like I/O.
    Also return the output as `str` or `bytes` (for binary output document
    formats).

    Parameters: see `publish_programmatically()`.
    r   r   ra   r   r   rb   r   r%   r   r&   r   r+   r   rE   rY   rA   r   rV   )publish_programmaticallyr   r   r   )r   ra   r   rb   r   r%   r   r&   r   r+   r   rE   rY   rA   r   rn   r   s                    r    publish_filer     s     1 
/ 
/ 
/\\
/*0&
/>Ik
/--
/  K
/ 3C2B
/ v	
/ $/;	
/
 v
/
 $/;
/ v
/ $/;
/ 
/ *7
/ .-
/ &~
/ .-
/FI Mr"   c                     t          di dt          j        d| d|dt          j        ddd|d|d	|d
|d|d|d|d|	d|
d|d|d|\  }}|S )uC  
    Set up & run a `Publisher` for programmatic use with string I/O.

    Accepts a `bytes` or `str` instance as `source`.

    The output is encoded according to the `output_encoding`_ setting;
    the return value is a `bytes` instance (unless `output_encoding`_ is
    "unicode", cf. `docutils.io.StringOutput.write()`).

    Parameters: see `publish_programmatically()`.

    This function is provisional because in Python 3 name and behaviour
    no longer match.

    .. _output_encoding:
        https://docutils.sourceforge.io/docs/user/config.html#output-encoding
    r   r   ra   r   r   Nrb   r   r%   r   r&   r   r+   r   rE   rY   rA   r   rV   )r   r   StringInputStringOutput)r   ra   rb   r   r%   r   r&   r   r+   r   rE   rY   rA   r   rn   r   s                   r    publish_stringr     s    0 1 
/ 
/ 
/^^
/,2F
/@K
///
/ D
/ ,<+;
/ v	
/ $/;	
/
 v
/
 $/;
/ v
/ $/;
/ 
/ *7
/ .-
/ &~
/ .-
/FI Mr"   c                     t          di d| d|d|dt          j        ddd|d|d	|d
|d|d|d|	d|
d|d|d|d|\  }}|j        j        S )a  
    Set up & run a `Publisher`, and return a dictionary of document parts.

    Dictionary keys are the names of parts.
    Dictionary values are `str` instances; encoding is up to the client,
    e.g.::

       parts = publish_parts(...)
       body = parts['body'].encode(parts['encoding'], parts['errors'])

    See the `API documentation`__ for details on the provided parts.

    Parameters: see `publish_programmatically()`.

    __ https://docutils.sourceforge.io/docs/api/publisher.html#publish-parts
    r   ra   r   r   r   Nrb   r   r%   r   r&   r   r+   r   rE   rY   rA   r   rV   )r   r   r   r   rF   )r   ra   r   rb   r   r%   r   r&   r   r+   r   rE   rY   rA   r   rn   r   s                    r    publish_partsr     s    0 1 
/ 
/ 
/v
/#.;
/=I\
///
/ D
/ ,<+;
/ v	
/ $/;	
/
 v
/
 $/;
/ v
/ $/;
/ 
/ *7
/ .-
/ &~
/ .-
/FI !!r"   c                     t          di d| d|d|dddddt          j        d|d	|d
|d|ddddd|d|d|	d|
d|\  }}|j        S )z
    Set up & run a `Publisher` for programmatic use. Return a document tree.

    Parameters: see `publish_programmatically()`.
    r   ra   r   r   Nrb   r   r   r%   r   r&   r   r+   nullr   rE   rY   rA   r   rV   )r   r   
NullOutputr   )r   ra   r   r   r%   r   r&   r   rE   rY   rA   r   _outputr   s                 r    publish_doctreer      s     2 
/ 
/ 
/v
/#.;
/!\
/ D
/ ,04
/ --	
/
 v
/
 $/;
/ v
/ $/;
/ t
/ "(
/ 
/ *7
/ .-
/ ?Mn
/ .-
/GY r"   c	                 F   t          j        d          }	t          |	d|t          j        |           t          j        |          }
|s|r|
                    |           |
                    |||           |
                    d|           |
	                    |          S )u  
    Set up & run a `Publisher` to render from an existing document tree
    data structure. For programmatic use with string output
    (`bytes` or `str`, cf. `publish_string()`).

    Note that ``document.settings`` is overridden; if you want to use the
    settings of the original `document`, pass ``settings=document.settings``.

    Also, new `document.transformer` and `document.reporter` objects are
    generated.

    Parameters: `document` is a `docutils.nodes.document` object, an existing
    document tree.

    Other parameters: see `publish_programmatically()`.

    This function is provisional because in Python 3 name and behaviour
    of the `io.StringOutput` class no longer match.
    r   )r&   N)r   r   r   r   )
r   Readerr   r   DocTreeInputr   r-   rZ   rd   r   )r   rb   r   r+   r   rE   rY   rA   r   r   r   s              r    publish_from_doctreer     s    0 ^///F&$!#!:!:,.O#+- - -I  *k *[)))++)>; ; ;d$45550BCCCr"   c           	          t          | ||||          }|                    |||           |                    ||||||	|
          }|S )a  
    Set up & run a `Publisher` for command-line-based file I/O (input and
    output file paths taken automatically from the command line).
    Also return the output as `bytes`.

    This is just like publish_cmdline, except that it uses
    io.BinaryFileOutput instead of io.FileOutput.

    Parameters: see `publish_programmatically()` for the remainder.

    - `argv`: Command-line argument list to use instead of ``sys.argv[1:]``.
    - `usage`: Usage string, output if there's a problem parsing the command
      line.
    - `description`: Program description, output for the "--help" option
      (along with command-line option descriptions).
    )r   r   r   r   )r   r%   r   r&   r   r+   r   rE   rY   rA   r   r]   r<   r=   r   r   r   rn   s                     r    publish_cmdline_to_binaryr   ?  sp    : &&&8,=? ? ?I[+{CCCe[-1C%:L  N NF Mr"   c                    t          |||
|| |          }|                    ||	|           |                    |||           |                    ||           |                    ||           |                    |          }||fS )a^  
    Set up & run a `Publisher` for custom programmatic use.

    Return the output (as `str` or `bytes`, depending on `destination_class`,
    writer, and the "output_encoding" setting) and the Publisher object.

    Applications should not need to call this function directly.  If it does
    seem to be necessary to call this function directly, please write to the
    Docutils-develop mailing list
    <https://docutils.sourceforge.io/docs/user/mailing-lists.html#docutils-develop>.

    Parameters:

    * `source_class` **required**: The class for dynamically created source
      objects.  Typically `io.FileInput` or `io.StringInput`.

    * `source`: Type depends on `source_class`:

      - If `source_class` is `io.FileInput`: Either a file-like object
        (must have 'read' and 'close' methods), or ``None``
        (`source_path` is opened).  If neither `source` nor
        `source_path` are supplied, `sys.stdin` is used.

      - If `source_class` is `io.StringInput` **required**:
        The input as either a `bytes` object (ensure the 'input_encoding'
        setting matches its encoding) or a `str` object.

    * `source_path`: Type depends on `source_class`:

      - `io.FileInput`: Path to the input file, opened if no `source`
        supplied.

      - `io.StringInput`: Optional.  Path to the file or name of the
        object that produced `source`.  Only used for diagnostic output.

    * `destination_class` **required**: The class for dynamically created
      destination objects.  Typically `io.FileOutput` or `io.StringOutput`.

    * `destination`: Type depends on `destination_class`:

      - `io.FileOutput`: Either a file-like object (must have 'write' and
        'close' methods), or ``None`` (`destination_path` is opened).  If
        neither `destination` nor `destination_path` are supplied,
        `sys.stdout` is used.

      - `io.StringOutput`: Not used; pass ``None``.

    * `destination_path`: Type depends on `destination_class`:

      - `io.FileOutput`: Path to the output file.  Opened if no `destination`
        supplied.

      - `io.StringOutput`: Path to the file or object which will receive the
        output; optional.  Used for determining relative paths (stylesheets,
        source links, etc.).

    * `reader`: A `docutils.readers.Reader` object.

    * `reader_name`: Name or alias of the Reader class to be instantiated if
      no `reader` supplied.

    * `parser`: A `docutils.parsers.Parser` object.

    * `parser_name`: Name or alias of the Parser class to be instantiated if
      no `parser` supplied.

    * `writer`: A `docutils.writers.Writer` object.

    * `writer_name`: Name or alias of the Writer class to be instantiated if
      no `writer` supplied.

    * `settings`: A runtime settings (`docutils.frontend.Values`) object, for
      dotted-attribute access to runtime settings.  It's the end result of the
      `SettingsSpec`, config file, and option processing.  If `settings` is
      passed, it's assumed to be complete and no further setting/config/option
      processing is done.

    * `settings_spec`: A `docutils.SettingsSpec` subclass or object.  Provides
      extra application-specific settings definitions independently of
      components.  In other words, the application becomes a component, and
      its settings data is processed along with that of the other components.
      Used only if no `settings` specified.

    * `settings_overrides`: A dictionary containing application-specific
      settings defaults that override the defaults of other components.
      Used only if no `settings` specified.

    * `config_section`: A string, the name of the configuration file section
      for this application.  Overrides the ``config_section`` attribute
      defined by `settings_spec`.  Used only if no `settings` specified.

    * `enable_exit_status`: Boolean; enable exit status at end of processing?
    )r   r   r   r   )r   r1   rZ   rc   rd   r   )r   r   ra   r   r   rb   r   r%   r   r&   r   r+   r   rE   rY   rA   r   r   rn   s                      r    r   r   e  s    J &&&8'3,=? ? ?I [+{CCC++)>; ; ;---k+;<<<2DEEF9r"   r   c                     d| d| dt           z   }t          j        t          j        d           t	          | |           d S )Nz	Generate zZ documents from standalone reStructuredText sources <https://docutils.sourceforge.io/docs/z>.  r   )r+   r=   )default_descriptionlocale	setlocaleLC_ALLr   )r   documenttypedoc_pathr=   s       r    rst2somethingr     sj    	@L 	@ 	@19	@ 	@ 	@ 	 
 V]B'''K@@@@@@r"   c                  (    t          ddd           d S )NhtmlHTMLzuser/html.html#htmlr   rV   r"   r    rst2htmlr     s    &&"788888r"   c                  (    t          ddd           d S )Nhtml4z	XHTML 1.1zuser/html.html#html4css1r   rV   r"   r    	rst2html4r     s    ';(BCCCCCr"   c                  (    t          ddd           d S )Nhtml5HTML5zuser/html.html#html5-polyglotr   rV   r"   r    	rst2html5r     s    '7$CDDDDDr"   c                  (    t          ddd           d S )NlatexLaTeXuser/latex.htmlr   rV   r"   r    	rst2latexr     s    '7$566666r"   c                  (    t          ddd           d S )NmanpagezUnix manual (troff)zuser/manpage.htmlr   rV   r"   r    rst2manr    s    )24GHHHHHr"   c                  (    t          ddd           d S )NodtzOpenDocument text (ODT)zuser/odt.htmlr   rV   r"   r    rst2odtr    s    %2ODDDDDr"   c                  (    t          ddd           d S )Nr   zpseudo-XML (test)ref/doctree.htmlr   rV   r"   r    rst2pseudoxmlr	    s    +24FGGGGGr"   c                  (    t          ddd           d S )Ns5zS5 HTML slideshowzuser/slide-shows.htmlr   rV   r"   r    rst2s5r    s    $+-DEEEEEr"   c                  (    t          ddd           d S )NxetexzLaTeX (XeLaTeX/LuaLaTeX)r   r   rV   r"   r    	rst2xetexr    s    '57HIIIIIr"   c                  (    t          ddd           d S )NxmlzDocutils-native XMLr  r   rV   r"   r    rst2xmlr    s    %.0BCCCCCr"   )NNNNNr   Nr   Nr   NNNNF)NNNr   Nr   Nr   NNNNF)NNr   NNNNF)r   )+r   __docformat__r   r   r   r\   r>   docutilsr   r   r   r   r   r	   r
   docutils.frontendr   docutils.readersr   r   default_usager   r   r   r   r   r   r   r   BinaryFileOutputr   r   r   r   r   r   r   r  r  r	  r  r  r  rV   r"   r    <module>r     sa  
	 	 #   				 



 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 * * * * * * $ $ $ $ $ $J5 J5 J5 J5 J5 J5 J5 J5Z
 =)   \-?[!'+D'+$'5H   : +/48*6*<*5GK9>   8 ?C,8,>,704;?&+# # # #L '+#'<+=;t%)$%*#" #" #" #"L )-!#\-?!'+D',   4 592=6:AE,1	"D "D "D "DJ &*|%)7I%){'+,015-115#'$1*=*.020C# # # #Ln n nhA A A A9 9 9D D DE E E7 7 7I I IE E EH H HF F FJ J JD D D D Dr"   