
    k7i                    ^   S r SSKJr  SrSSKrSSKrSSKrSSKrSSKrSSK	J
r
JrJrJrJrJrJrJr  SSKJr  SSKJr  Sr\(       a  SS	KJr  SS
KJr   " S S5      rSrSrSSSSSSSSSSSS\\4S jr       S'S jr       S(S jr S\RB                  SSSSSSSSSSSS4S jr"S\RB                  SSSSSSSSS4S jr#     S)S jr$SSSSSSSSSSSS\\S\RJ                  4S jr&S*S jr'S r(S+S*S jjr)S*S jr*S*S jr+S*S jr,S*S  jr-S*S! jr.S*S" jr/S*S# jr0S*S$ jr1S*S% jr2S*S& jr3g),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
    )annotationsreStructuredTextN)__version____version_details__SettingsSpecioutilsreadersparserswriters)OptionParser)doctreeF)TextIO)StrPathc                  R   \ rS rSrSrSSSS\R                  S\R                  S4 SS jjrSSS jjr	SS jr
SS jr  SS jr  SS	 jr  SS
 jr  S SS jjrSSS jjr  S     SS jjr  S     SS jjrSS jr   SS jrSS jrSS jrSS jrSS jrSS jrSrg)	Publisher%   zC
A facade encapsulating the high-level logic of a Docutils system.
Nc	                n   [        U[        5      (       a  [        R                  " U5      " U5      n[        U[        5      (       ae  [        U[        R                  5      (       a+  UR
                  c  UR                  U5        UR
                  nO[        R                  " U5      " 5       n[        U[        5      (       a  [        R                  " U5      " 5       nSU l         Xl         X l         X0l         X@l         XPl         X`l         Xpl         Xl         [&        R(                  " 5       U l        g)z
Initial setup.

The components `reader`, `parser`, or `writer` should all be
specified, either as instances or via their names.
N)
isinstancestrr
   get_reader_classReaderparser
set_parserr   get_parser_classr   get_writer_classdocumentreaderwritersourcesource_classdestinationdestination_classsettingsr   ErrorOutput_stderr)	selfr   r   r   r    r!   r"   r#   r$   s	            G/home/james-whalen/.local/lib/python3.13/site-packages/docutils/core.py__init__Publisher.__init__+   s     fc""--f5f=Ffc""&'..11==(%%f- 11&9;fc""--f57F;333G(?&	 "3D 	J ~~'    c                   [         R                  " U5      nU" X#5      U l        U R                  R                  b  U R                  R                  U l        gU R                  b  U R                  U R                  l        gg)zpSet `self.reader` by name.

The "paser_name" argument is deprecated,
use "parser" with parser name or instance.
N)r
   r   r   r   )r'   r   r   parser_namereader_classs        r(   
set_readerPublisher.set_readera   s`     //7"67;;)++,,DK[[$!%DKK %r+   c                H    [         R                  " U5      nU" 5       U l        g)zSet `self.writer` by name.N)r   r   r   )r'   writer_namewriter_classs      r(   
set_writerPublisher.set_writern   s    //<"nr+   c                |   [         R                  " S[        SS9  U R                  c  U R	                  XR
                  U5        U R
                  cM  U R                  R
                  c  U R                  R                  U5        U R                  R
                  U l        U R                  c  U R                  U5        g g )Nzh`Publisher.set_components()` will be removed in Docutils 2.0.  Specify component names at instantiation.   
stacklevel)	warningswarnPendingDeprecationWarningr   r/   r   r   r   r4   )r'   reader_namer-   r2   s       r(   set_componentsPublisher.set_componentss   s     * 0A	? ;;OOKkB;;{{!!)&&{3++,,DK;;OOK( r+   c           	        [         R                  " 5          [         R                  " S[        S9  U(       aG  U(       d
  [	        5       nXCl        UR                  5       n[        U5      S:  a  US   S:X  a  S/Ul        [        U R                  U R                  U R                  U4USXS9sS S S 5        $ ! , (       d  f       g = f)	Nignore)category   applicationapplicationsT)
componentsdefaultsread_config_filesusagedescription)r:   catch_warningsfilterwarningsDeprecationWarningr   config_sectionsplitlenconfig_section_dependenciesr   r   r   r   )r'   rJ   rK   settings_specrO   rH   partss          r(   _setup_settings_parser Publisher._setup_settings_parser   s     $$&##H7IJ$$0NM/=,&,,.u:>eBi=&@AO@PM= KKdkk)+!T	6 '&&s   BB55
Cc                l    U R                   " XX440 UD6nUR                  5       U l        U R                  $ )aK  
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.
)rU   get_default_valuesr$   )r'   rJ   rK   rS   rO   rH   option_parsers          r(   get_settingsPublisher.get_settings   s=     33KAIK%88:}}r+   c                    U R                   cA  U(       a  UR                  5       O0 nUR                  SS5        U R                  " SUUS.UD6  g g )N	tracebackT)rS   rO    )r$   copy
setdefaultrZ   )r'   rS   settings_overridesrO   rH   s        r(   process_programmatic_settings'Publisher.process_programmatic_settings   sV     == 4F)..0BHT2 *M-;* (*	 !r+   c                    U R                   " X#XE40 UD6nUc  [        R                  SS nUR                  U5      U l        g)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`).
NrC   )rU   sysargv
parse_argsr$   )r'   rf   rJ   rK   rS   rO   rH   rY   s           r(   process_command_linePublisher.process_command_line   sI     33KAIK<88AB<D%006r+   c                v    U R                   c  U R                  US9  U R                  c  U R                  US9  g g )N)source_path)destination_path)r    
set_sourcer"   set_destination)r'   rk   rl   s      r(   set_ioPublisher.set_io   s=    ;;OOO4#  2B C $r+   c                    Uc  U R                   R                  nO&[        R                  " U5      nX R                   l        U R	                  XU R                   R
                  U R                   R                  S9U l        g )N)r    rk   encodingerror_handler)r$   _sourceosfspathr!   input_encodinginput_encoding_error_handlerr    )r'   r    rk   s      r(   rm   Publisher.set_source   sf     --//K))K0K$/MM!'']]11--DD ( Fr+   c                   Ub'  [         R                  " U5      U R                  l        GO2[	        U R                  SS 5      (       a@  U R                  R                  (       d%  U R                  R
                  U R                  l        U R                  R                  (       aT  U R                  R                  (       a9  U R                  R                  U R                  R                  :w  a  [        S5      eU R                  R                  c%  U R                  R                  U R                  l        U R                  R                  S:X  a  S U R                  l        U R                  R                  =U R                  l        U R                  l        U R                  UU R                  R                  U R                  R                  U R                  R                  S9U l        g )NoutputznThe --output-path option obsoletes the second positional argument (DESTINATION). You cannot use them together.-)r"   rl   rr   rs   )ru   rv   r$   output_pathgetattrr{   _destination
SystemExitr#   output_encodingoutput_encoding_error_handlerr"   )r'   r"   rl   s      r(   rn   Publisher.set_destination   sU    '(*		2B(CDMM% t}}h  !%!:!:,0MM,@,@)))dmm.H.HMM--1K1KK  "A B B }}((0,0MM,F,F)}}((C/,0)mm''	("T]]%9  11#!]]66]]22--EE	 2 Gr+   c                   U R                   R                  R                  U R                  U R                  U R                  R
                  U R                  U R                  45        U R                   R                  R                  5         g )N)	r   transformerpopulate_from_componentsr    r   r   r   r"   apply_transforms)r'   s    r(   r   Publisher.apply_transforms   s_    !!::[[$++t{{'9'94;;	  	!!224r+   c                X   Sn U R                   c  U R                  " XX4U40 U=(       d    0 D6  U R                  5         U R                  5         U R                  R                  U R                  U R                  U R                   5      U l        U R                  5         U R                  R                  U R                  U R                  5      n	U R                  R                  5         U R%                  5         U(       a  U R                  (       aq  U R                  R(                  R*                  U R                   R,                  :  a9  [.        R0                  " U R                  R(                  R*                  S-   5        W	$ U(       a  [.        R0                  " W5        W	$ ! [         a  n
SnU
R                  n Sn
A
NSn
A
f[          a^  n
U R                   (       d  e U R                   R"                  (       a  U R%                  5         e U R'                  U
5        SnSn Sn
A
GN;Sn
A
ff = f)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.
NTrC   
   )r$   rh   ro   promptr   readr    r   r   r   r   writer"   assemble_partsr   code	Exceptionr]   debugging_dumpsreport_Exceptionreporter	max_levelexit_status_levelre   exit)r'   rf   rJ   rK   rS   ra   rO   enable_exit_statusexit_r{   errorexit_statuss               r(   publishPublisher.publish   s    	}}$))^2)/R2 KKMKKM KK,,T[[$++-1]]<DM!!#[[&&t}}d6F6FGFKK&&( 	4==''11MM334HHT]]++55:;  HH[!'  	%E**K 	==}}&&$$&!!%(EK	s%   C%F! !
H)+F>>H)AH$$H)c                b   U R                   (       d  g U R                  R                  (       aP  [        SU R                  S9  [        [
        R                  " U R                  R                  5      U R                  S9  U R                  R                  (       aP  [        SU R                  S9  [        [
        R                  " U R                   R                  5      U R                  S9  U R                  R                  (       a  [        SU R                  S9  [        SU R                  S9  [        [
        R                  " U R                   R                  R                   VVVVs/ s H9  u  pp4XR                  < SUR                  < 3U=(       a    UR                  U4PM;     snnnn5      U R                  S9  U R                  R                  (       aP  [        SU R                  S9  [        U R                   R                  5       R!                  S5      U R                  S9  g g s  snnnnf )	Nz
::: Runtime settings:filez
::: Document internals:z
::: Transforms applied:z@ (priority, transform class, pending node details, keyword args).z
::: Pseudo-XML:raw_unicode_escape)r   r$   dump_settingsprintr&   pprintpformat__dict__dump_internalsdump_transformsr   applied
__module____name__detailsdump_pseudo_xmlencode)r'   priorityxclasspendingkwargss        r(   r   Publisher.debugging_dumps'  s   }}==&&+$,,?&..!7!78t||L==''-DLLA&..!7!78t||L==((-DLLA "(,6&.. MM--557 6 7Xw '8'8&//J-goov7 678 ?Cll	L
 ==((%DLL9$--'')00$&,0LL: )	7s   &A H)c                    U R                   R                  5       (       a  U R                  R                  5       (       d  g [        R
                  S:X  a  SOSnSnSn U R                  R                  S   nU R                  R                  S   n[        S[         S	U S
U SU S3	U R                  S9  g! [         a     gf = f! [        [        4 a     NHf = f)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&   AttributeErrorru   namer   	supportedr   
IndexErrorr   r   )r'   eot_key	in_format
out_formats       r(   r   Publisher.prompt>  s    	KK&&((T\\-@-@-B-B .C !ggo(8	%
	--a0I..q1J 		+ '&Kx
| <99@	 B##
 <<	!  		 
+ 		s#   >B7 2C 7
CCCCc                   [        U[        R                  5      (       a  U R                  U5        g [        U[        5      (       a  U R                  U5        g [        U[        R                  5      (       a3  U R                  R                  S[        R                  " U5      -  5        g [        U[        R                  5      (       a3  U R                  R                  S[        R                  " U5      -  5        g [        S[        R                  " U5      -  U R                  S9  [        S[         [        (       a
  S[         S3OS S	[        R                   R#                  5       S
    S3U R                  S9  g )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   re   versionrP   r'   r   s     r(   r   Publisher.report_ExceptionT  s-   eU0011%%e,122$$U+r}}--LL  (*,//%*@ A Br~~..LL??5123 $//dllC 1 2= 3 32! < =""$Q'( ) %)LL2r+   c                    [        SUR                  < S[        R                  R                  UR                     < S3U R
                  S9  g )NzExiting due to level-z (z) system message.r   )r   levelr	   Reporterlevelsr&   r   s     r(   r   Publisher.report_SystemMessagej  s3    ++u~~44U[[AC<<	!r+   c                   UR                   UR                  UR                   nU R                  R	                  [
        R                  " U5      < SU R                  R                  < SUR                  SS5      < SUR                  SS5      < SU R                  R                  < S[        < S	[        R                  R                  5       S
   < S35        g )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$   r   r   r   r   re   r   rP   )r'   r   datas      r(   r   Publisher.report_UnicodeErroro  s    ||EKK		2* u%}},,{{7$78{{7$67}}::CKK--/234	5r+   )
r&   r"   r#   r   r   r   r$   r    r!   r   returnNone)NN)NNNN)NNNNN)r    z
str | Nonerk   StrPath | Noner   r   )r"   zTextIO | Nonerl   r   r   r   )NNNNNNF)r   r   __qualname____firstlineno____doc__r   	FileInput
FileOutputr)   r/   r4   r>   rU   rZ   rb   rh   ro   rm   rn   r   r   r   r   r   r   r   __static_attributes__r^   r+   r(   r   r   %   s    #42<<!R]]4( $(4(l-%
) >BBF6, 488<"	*9=	* GK@D7,07"D )-15F%F .F F 6:;?G%2G*8G "G>5 :>7;8=(T:.!,2,!
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.Tc           
         [        XU5        U =(       d    U=(       d    Sn U=(       d    U=(       d    SnU=(       d    U=(       d    Sn[        XXFS9nUR                  XXUXS9nU$ )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 `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).

standalonerestructuredtext	pseudoxml)r$   rO   r   )_name_arg_warningr   r   )r   r=   r   r-   r   r2   r$   rS   ra   rO   r   rf   rJ   rK   	publisherr{   s                   r(   publish_cmdliner     sp    , k<2{2lF8{8&8F1{1kF&&DI[1C%  NF Mr+   c                    [        XWU	5        [        S0 S[        R                  _SU _SU_S[        R                  _SU_SU_SU_SU_S	U_S
U_SU_SU	_SU
_SU_SU_SU_SU_6u  nnU$ )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    rk   r#   r"   rl   r   r=   r   r-   r   r2   r$   rS   ra   rO   r   r^   )r   publish_programmaticallyr   r   r   )r    rk   r"   rl   r   r=   r   r-   r   r2   r$   rS   ra   rO   r   r{   
_publishers                    r(   publish_filer     s     k<1 
/\\
/*0
/>I
/--
/  
/ 3C
/ 	
/ $/	
/
 
/
 $/
/ 
/ $/
/ 
/ *7
/ .
/ &
/ .
/FJ Mr+   c                    [        XFU5        [        S0 S[        R                  _SU _SU_S[        R                  _SS_SU_SU_S	U_S
U_SU_SU_SU_SU	_SU
_SU_SU_SU_6u  pU$ )u`  
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()` or
https://docutils.sourceforge.io/docs/api/publisher.html#publish-string

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    rk   r#   r"   Nrl   r   r=   r   r-   r   r2   r$   rS   ra   rO   r   r^   )r   r   r   StringInputStringOutput)r    rk   rl   r   r=   r   r-   r   r2   r$   rS   ra   rO   r   r{   r   s                   r(   publish_stringr     s    4 k<1 
/^^
/,2
/@K
///
/ 
/ ,<
/ 	
/ $/	
/
 
/
 $/
/ 
/ $/
/ 
/ *7
/ .
/ &
/ .
/F Mr+   c                    [        XWU	5        [        S0 SU _SU_SU_S[        R                  _SS_SU_SU_S	U_S
U_SU_SU_SU	_SU
_SU_SU_SU_SU_6u  nnUR                  R
                  $ )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    rk   r!   r#   r"   Nrl   r   r=   r   r-   r   r2   r$   rS   ra   rO   r   r^   )r   r   r   r   r   rT   )r    rk   r!   rl   r   r=   r   r-   r   r2   r$   rS   ra   rO   r   _outputr   s                    r(   publish_partsr   	  s    2 k<1 
/
/#.
/=I
///
/ 
/ ,<
/ 	
/ $/	
/
 
/
 $/
/ 
/ $/
/ 
/ *7
/ .
/ &
/ .
/GY !!!r+   c                    [        XFS5        [        S0 SU _SU_SU_SS_SS_S[        R                  _SU_S	U_S
U_SU_SS_SS_SU_SU_SU	_SU
_SU_6u  pUR                  $ )zy
Set up & run a `Publisher` for programmatic use. Return a document tree.

Parameters: see `publish_programmatically()`.
Nr    rk   r!   r"   rl   r#   r   r=   r   r-   r   nullr2   r$   rS   ra   rO   r   r^   )r   r   r   
NullOutputr   )r    rk   r!   r   r=   r   r-   r$   rS   ra   rO   r   r   r   s                 r(   publish_doctreer   2  s     k51 
/
/#.
/!
/ 
/ ,0
/ --	
/
 
/
 $/
/ 
/ $/
/ 
/ $(
/ 
/ *7
/ .
/ ?M
/ .
/G r+   c	                *   [        SSU5        [        [        R                  " 5       U=(       d    U=(       d    S[        R
                  " U 5      [        R                  US9n	U	R                  XVU5        U	R                  SU5        U	R                  US9$ )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.
Nr   )r   r   r    r#   r$   r   )
r   r   r   r   r   DocTreeInputr   rb   rn   r   )
r   rl   r   r2   r$   rS   ra   rO   r   r   s
             r(   publish_from_doctreer   O  s    2 dD+.!1!'!E;!E+!#!:,.OO#+	-I
 ++>;d$450BCCr+   r   r   r   c           
         [         R                  " S[        SS9  [        XXFUS9nUR	                  XU5        UR                  XXUXS9nU$ )u  
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).

Deprecated. Use `publish_cmdline()` (works with `bytes` since
Docutils 0.20). Will be removed in Docutils 0.24.
zg"publish_cmdline_to_binary()" is obsoleted by "publish_cmdline()" and will be removed in Docutils 0.24.r7   r8   )r$   r#   r   )r:   r;   rN   r   r>   r   )r   r=   r   r-   r   r2   r$   rS   ra   rO   r   rf   rJ   rK   r"   r#   r   r{   s                     r(   publish_cmdline_to_binaryr  t  sg    @ MM '(:qJ &&,=?I[{C[1C%  NF Mr+   c            
         [        SU 5       H.  u  pUc  M
  [        R                  " SU SU SU S3[        SS9  M0     g )N)r   r   r   z
Argument "z1_name" will be removed in Docutils 2.0.  Specify z name in the "z" argument.   r8   )zipr:   r;   r<   )	name_args	componentname_args      r(   r   r     sS    "#A9M	MMJyk 244=; ?%%.K{< 4C  Nr+   c           	         U=(       d    U=(       d    SnU=(       d    U	=(       d    SnU
=(       d    U=(       d    Sn
[        XhXU US9nUR                  XU5        UR                  X5        UR                  XE5        UR	                  US9nUU4$ )aD  
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.

Internal:
Applications should not 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` instance, name, or alias.
  Default: "standalone".

* `reader_name`: Deprecated. Use `reader`.

* `parser`: A `docutils.parsers.Parser` instance, name, or alias.
  Default: "restructuredtext".

* `parser_name`: Deprecated. Use `parser`.

* `writer`: A `docutils.writers.Writer` instance, name, or alias.
  Default: "pseudoxml".

* `writer_name`: Deprecated. Use `writer`.

* `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!   r#   r   )r   rb   rm   rn   r   )r!   r    rk   r#   r"   rl   r   r=   r   r-   r   r2   r$   rS   ra   rO   r   r   r{   s                      r(   r   r     s    L 2{2lF8{8&8F1{1kF&&'3,=?I ++>;-k<2DEF9r+   c                
   SU SU S3[         -   n [        R                  " [        R                  S5        [        XS9  g ! [        R                   a-  n[
        R                  R                  SU S35         S nANFS nAff = f)Nz	Generate zZ documents from standalone reStructuredText sources <https://docutils.sourceforge.io/docs/z>.  r   z(WARNING: Cannot set the default locale: z.
)r   rK   )	default_descriptionlocale	setlocaleLC_ALLErrorre   stderrr   r   )r   documenttypedoc_pathrK   es        r(   rst2somethingr  !  s     L> "119
$	@ 	 
L+ 6; << L

CA3cJKKLs   %A B#A==Bc                     [        SSS5        g )NhtmlHTMLzuser/html.html#htmlr  r^   r+   r(   rst2htmlr  2  s    &&"78r+   c                     [        SSS5        g )Nhtml4z	XHTML 1.1zuser/html.html#html4css1r  r^   r+   r(   	rst2html4r  6  s    ';(BCr+   c                     [        SSS5        g )Nhtml5HTML5zuser/html.html#html5-polyglotr  r^   r+   r(   	rst2html5r  :  s    '7$CDr+   c                     [        SSS5        g )NlatexLaTeXuser/latex.htmlr  r^   r+   r(   	rst2latexr$  >  s    '7$56r+   c                     [        SSS5        g )NmanpagezUnix manual (troff)zuser/manpage.htmlr  r^   r+   r(   rst2manr'  B  s    )24GHr+   c                     [        SSS5        g )NodtzOpenDocument text (ODT)zuser/odt.htmlr  r^   r+   r(   rst2odtr*  F  s    %2ODr+   c                     [        SSS5        g )Nr   zpseudo-XML (test)ref/doctree.htmlr  r^   r+   r(   rst2pseudoxmlr-  J  s    +24FGr+   c                     [        SSS5        g )Ns5zS5 HTML slideshowzuser/slide-shows.htmlr  r^   r+   r(   rst2s5r0  N  s    $+-DEr+   c                     [        SSS5        g )NxetexzLaTeX (XeLaTeX/LuaLaTeX)r#  r  r^   r+   r(   	rst2xetexr3  R  s    '57HIr+   c                     [        SSS5        g )NxmlzDocutils-native XMLr,  r  r^   r+   r(   rst2xmlr6  V  s    %.0BCr+   )NNNNNNNNNNNNNNF)NNNNNNNNNNNNF)NNNNNNNFr   )r   )4r   
__future__r   __docformat__r  r   ru   re   r:   docutilsr   r   r   r   r	   r
   r   r   docutils.frontendr   docutils.readersr   TYPE_CHECKINGtypingr   docutils.nodesr   r   default_usager
  r   r   r   r   r   r   r   BinaryFileOutputr  r   r   r  r  r  r  r$  r'  r*  r-  r0  r3  r6  r^   r+   r(   <module>rA     s  
	 #"   	 
 < < < * $&f5 f5R =)   TTT!'+D'+$'5HD +/48*.*.*.GK9>> ?C,0,0,004;?&+'T '+#'444t%)$%*&"R )-!#TT!'+D',: 59266:AE,1	"DJ &*|%)7I%){'+,015-115#'$1*=*.020C0C)XCrp<"9DE7IEHFJDr+   