%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/markdown_it/cli/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/markdown_it/cli/__pycache__/parse.cpython-312.pyc

�

'W�dU���dZddlmZddlZddlmZmZddlZddlm	Z	ddl
mZdje	�Z
ddd�Zdd	�Zdd
�Zdd�Zdd�Zdd
�Zedk(r(eej*dd�Zej.e�yy)zo
CLI interface to markdown-it-py

Parse one or more markdown files, convert each to HTML, and print to stdout.
�)�annotationsN)�Iterable�Sequence)�__version__)�
MarkdownItzmarkdown-it-py [version {}]c�r�t|�}|jrt|j�yt�y)Nr)�
parse_args�	filenames�convert�interactive)�args�	namespaces  �7/usr/lib/python3/dist-packages/markdown_it/cli/parse.py�mainrs2���4� �I�����	�#�#�$�
�	�
��c�(�|D]
}t|��y�N)�convert_file)r
�filenames  rrrs������X��rc�D�	t|ddd��5}t�j|j��}t	|d��ddd�y#1swYyxYw#t
$r;tjjd|�d	��t
jd
�YywxYw)z>
    Parse a Markdown file and dump the output to stdout.
    �r�utf8�ignore)�encoding�errors���endNzCannot open file "z".
�)
�openr�render�read�print�OSError�sys�stderr�write�exit)r�fin�rendereds   rrr!s����
�(�C�&��
B�	$�c�!�|�*�*�3�8�8�:�6�H��(��#�	$�	$�	$�����
�
���-�h�Z�t�<�=�������s/�A�5A�A�A�A�A�AB�Bc	�,�t�g}d}		|rdnd\}}|jt|�dz��(#t$r=t	dt�j
dj|��zd��d}g}Y�Ft$rt	d�YywxYw)	zT
    Parse user input, dump to stdout, rinse and repeat.
    Python REPL style.
    F)z... T)z>>> T�
rrz	
Exiting.N)	�
print_heading�append�input�EOFErrorr#rr!�join�KeyboardInterrupt)�contents�more�prompts   rrr.s���
�O��H��D�
�		�-1�>�~�L�F�D��O�O�E�&�M�D�0�1����	��$���,�,�T�Y�Y�x�-@�A�A�r�J��D��H� �	��,���	�s�&8�AB�=B�Bc���tjddt�d�tj��}|j	dddt
��|j	d	d
d��|j
|�S)
zParse input CLI arguments.zKParse one or more markdown files, convert each to HTML, and print to stdoutz9
Interactive:

  $ markdown-it
  markdown-it-py [version a] (interactive)
  Type Ctrl-D to complete input, or Ctrl-C to exit.
  >>> # Example
  ... > markdown *input*
  ...
  <h1>Example</h1>
  <blockquote>
  <p>markdown <em>input</em></p>
  </blockquote>

Batch:

  $ markdown-it README.md README.footer.md > index.html
)�description�epilog�formatter_classz-vz	--version�version)�actionr:r
�*z,specify an optional list of files to convert)�nargs�help)�argparse�ArgumentParserr�RawDescriptionHelpFormatter�add_argument�version_strr	)r
�parsers  rr	r	Cs��
�
$�
$�4��'�-�
(�	
�&!�<�<�1�F�4����k�)�[��Q�
����3�%S������T�"�"rc�V�tdjt��td�y)Nz{} (interactive)z1Type Ctrl-D to complete input, or Ctrl-C to exit.)r#�formatrC�rrr-r-fs��	�
�
#�
#�K�
0�1�	�
=�>r�__main__rr)r
�Sequence[str] | None�return�int)r
z
Iterable[str]rJ�None)r�strrJrL)rJrL)r
rIrJzargparse.Namespace)�__doc__�
__future__rr?�collections.abcrrr%�markdown_itr�markdown_it.mainrrFrCrrrrr	r-�__name__�argv�	exit_coder(rGrr�<module>rVs~���
#��.�
�#�'�+�2�2�;�?��
��

��* #�F?�
�z���S�X�X�a�b�\�"�I��C�H�H�Y��r

Zerion Mini Shell 1.0