o
    i                     @  s   d Z ddlmZ d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 G dd dejZdd
dZedkrKejd drFdej ejd< e  dS dS )zGeneric command line interface for the `docutils` package.

See also
https://docs.python.org/3/library/__main__.html#main-py-in-python-packages
    )annotationsreStructuredTextN)	Publisherpublish_cmdlinedefault_descriptionc                	   @  sR   e Zd ZdZddddgdddfd	d
gdddfddgdddfffZdZdZdS )CliSettingsSpecu   Runtime settings & command-line options for the generic CLI.

    Configurable reader, parser, and writer components.

    The "--writer" default will change to 'html' in Docutils 2.0
    when 'html' becomes an alias for the current value 'html5'.
    zDocutils Application OptionszReader, writer, and parser settings influence the available options.   Example: use `--help --writer=latex` to see LaTeX writer options. z$Reader name (currently: "%default").--reader
standalonez<reader>)defaultmetavarz$Parser name (currently: "%default").--parserrstz<parser>z$Writer name (currently: "%default").--writerhtml5z<writer>zdocutils application)zdocutils-cli applicationapplicationsN)__name__
__module____qualname____doc__settings_specconfig_sectionconfig_section_dependencies r   r   W/var/www/html/karishye-ai-python/venv/lib/python3.10/site-packages/docutils/__main__.pyr   !   s"    	r   returnNonec               
   C  s"  z	t t jd W n t jy& }  ztjd|  d W Y d} ~ nd} ~ ww dt }t j	t
d}tjddd}|jd	|jd
 |jd|jd
 |jd|jd
 | \}}|jt
_zt|j|j|jt
||d W dS  ty } ztd| tjd d|v r td W Y d}~dS d}~ww )z?Generic command line interface for the Docutils Publisher.
     z(WARNING: Cannot set the default locale: z.
Nz(Convert documents into useful formats.  )r   F)add_helpallow_abbrevr   )r
   r   r   )readerparserwriterr   descriptionargvz%s.)filez--tracebackz"Use "--traceback" to show details.)locale	setlocaleLC_ALLErrorsysstderrwriter   r   get_settingsr   argparseArgumentParseradd_argumentr   r    r!   parse_known_args__dict__settings_default_overridesr   ImportErrorprint)er"   
components	argparserargs	remaindererrorr   r   r   main<   s>    r;   __main__z__main__.pyz%s -m docutils)r   r   )r   
__future__r   __docformat__r-   r%   r)   docutilsdocutils.corer   r   r   SettingsSpecr   r;   r   r#   endswith
executabler   r   r   r   <module>   s   
'
