o
     hd                     @  s  d dl mZ d dlZd dlmZmZmZ d dlmZ d dl	m
Z
 d dlmZ ddlmZ dd	lmZ dd
lmZ ddlmZmZmZmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl m!Z! ddl"m#Z#m$Z$ ddl%m&Z& ddl'm(Z(m)Z) G dd dZ*G dd de*Z+G dd de*Z,G dd de,Z-G dd de,Z.G dd de,Z/G d d! d!e,Z0G d"d# d#e*Z1G d$d% d%e*Z2G d&d' d'e*Z3G d(d) d)e*Z4G d*d+ d+e*Z5G d,d- d-e*Z6G d.d/ d/e*Z7G d0d1 d1e,Z8G d2d3 d3e,Z9G d4d5 d5e,Z:G d6d7 d7Z;G d8d9 d9eZ<e=d:krd dl>Z>d dlZe>j?d;d<Z@e@jAd=d>d?d@ e@jAdAdBdCdDddEdF e@jAdGdHdIdJdKdL e@jAdMdNdOddOdL e@jAdPdQdRdDdSdT e@jAdUdVeBdWddXdY e@jAdZd[d\dDd]dT e@jAd^d_d`dDdadT e@C ZDd dblEmZ eDjFdckrejGH ZIneJeDjFdddeZKeKH ZIW d   n	1 sw   Y  e<eIeDjLrdfndgeDjMeDjNeDjOdhZPeDjQrd dlRZRd dlSZSeRT ZUeeUeDjVeDjWdiZeXeP eSYeUZ  dS eeDjVeDjWdjdkZeXeP dS dS )l    )annotationsN)ClassVarIterableget_args)
MarkdownIt)Token)Table   box)
loop_first)Stack)ConsoleConsoleOptionsJustifyMethodRenderResult)Renderables)JupyterMixin)Panel)Rule)Segment)Style
StyleStack)Syntax)TextTextTypec                   @  sZ   e Zd ZU dZded< ed"d	d
Zd#ddZd$ddZd#ddZ	d%ddZ
d&dd Zd!S )'MarkdownElementTzClassVar[bool]new_linemarkdownMarkdowntokenr   returnc                 C  s   |  S )zFactory to create markdown element,

        Args:
            markdown (Markdown): The parent Markdown object.
            token (Token): A node from markdown-it.

        Returns:
            MarkdownElement: A new markdown element
         clsr   r    r"   r"   O/var/www/html/pro-man-master/venv/lib/python3.10/site-packages/rich/markdown.pycreate   s   zMarkdownElement.createcontextMarkdownContextNonec                 C     dS )zuCalled when the node is entered.

        Args:
            context (MarkdownContext): The markdown context.
        Nr"   selfr'   r"   r"   r%   on_enter)       zMarkdownElement.on_entertextr   c                 C  r*   )zpCalled when text is parsed.

        Args:
            context (MarkdownContext): The markdown context.
        Nr"   r,   r'   r/   r"   r"   r%   on_text0   r.   zMarkdownElement.on_textc                 C  r*   )zwCalled when the parser leaves the element.

        Args:
            context (MarkdownContext): [description]
        Nr"   r+   r"   r"   r%   on_leave7   r.   zMarkdownElement.on_leavechildboolc                 C  r*   )a|  Called when a child element is closed.

        This method allows a parent element to take over rendering of its children.

        Args:
            context (MarkdownContext): The markdown context.
            child (MarkdownElement): The child markdown element.

        Returns:
            bool: Return True to render the element, or False to not render the element.
        Tr"   r,   r'   r3   r"   r"   r%   on_child_close>   s   zMarkdownElement.on_child_closeconsoler   optionsr   r   c                 C  r*   )Nr"   r"   r,   r7   r8   r"   r"   r%   __rich_console__L   s   z MarkdownElement.__rich_console__Nr   r   r    r   r!   r   r'   r(   r!   r)   r'   r(   r/   r   r!   r)   r'   r(   r3   r   r!   r4   r7   r   r8   r   r!   r   )__name__
__module____qualname__r   __annotations__classmethodr&   r-   r1   r2   r6   r:   r"   r"   r"   r%   r      s   
 



r   c                   @  s   e Zd ZdZdS )UnknownElementzAn unknown element.

    Hopefully there will be no unknown elements, and we will have a MarkdownElement for
    everything in the document.

    N)r@   rA   rB   __doc__r"   r"   r"   r%   rE   R   s    rE   c                   @  s2   e Zd ZdZdZdddZdddZdddZdS )TextElementz)Base class for elements that render text.noner'   r(   r!   r)   c                 C  s   | | j| _tdd| _d S Nleftjustify)enter_style
style_namestyler   r/   r+   r"   r"   r%   r-   `   s   zTextElement.on_enterr/   r   c                 C  s(   | j |t|tr|j d S d  d S N)r/   append
isinstancestrcurrent_styler0   r"   r"   r%   r1   d   s   (zTextElement.on_textc                 C  s   |   d S rP   )leave_styler+   r"   r"   r%   r2   g      zTextElement.on_leaveNr<   r=   )r@   rA   rB   rF   rN   r-   r1   r2   r"   r"   r"   r%   rG   [   s    

rG   c                   @  s@   e Zd ZU dZdZded< edd
dZdddZdddZ	dS )	ParagraphzA Paragraph.zmarkdown.paragraphr   rL   r   r   r    r   r!   c                 C  s   | |j pddS rI   rK   r#   r"   r"   r%   r&   q   s   zParagraph.creater)   c                 C  s
   || _ d S rP   rK   r,   rL   r"   r"   r%   __init__u      
zParagraph.__init__r7   r   r8   r   r   c                 c  s    | j | j_ | jV  d S rP   )rL   r/   r9   r"   r"   r%   r:   x   s   
zParagraph.__rich_console__N)r   r   r    r   r!   rW   rL   r   r!   r)   r?   )
r@   rA   rB   rF   rN   rC   rD   r&   rY   r:   r"   r"   r"   r%   rW   k   s   
 
rW   c                      sD   e Zd ZdZedddZdddZd fddZdddZ  Z	S )Headingz
A heading.r   r   r    r   r!   c                 C  s
   | |j S rP   )tagr#   r"   r"   r%   r&      s   
zHeading.creater'   r(   r)   c                 C  s   t  | _|| j d S rP   )r   r/   rM   rN   r+   r"   r"   r%   r-      s   zHeading.on_enterr]   rS   c                   s    || _ d| | _t   d S )N	markdown.)r]   rN   superrY   )r,   r]   	__class__r"   r%   rY      s   zHeading.__init__r7   r   r8   r   r   c                 c  sL    | j }d|_| jdkrt|tjddV  d S | jdkr!tdV  |V  d S )Ncenterh1zmarkdown.h1.border)r   rO   h2 )r/   rL   r]   r   r   HEAVYr   )r,   r7   r8   r/   r"   r"   r%   r:      s   



zHeading.__rich_console__)r   r   r    r   r!   r\   r<   )r]   rS   r!   r)   r?   )
r@   rA   rB   rF   rD   r&   r-   rY   r:   __classcell__r"   r"   r`   r%   r\      s    
r\   c                   @  s6   e Zd ZdZdZeddd	ZdddZdddZdS )	CodeBlockz&A code block with syntax highlighting.zmarkdown.code_blockr   r   r    r   r!   c                 C  s(   |j pd}|dd }| |pd|jS )Nre    r   r/   )info	partition
code_theme)r$   r   r    	node_info
lexer_namer"   r"   r%   r&      s   
zCodeBlock.creatern   rS   themer)   c                 C  s   || _ || _d S rP   )rn   ro   )r,   rn   ro   r"   r"   r%   rY         
zCodeBlock.__init__r7   r   r8   r   r   c                 c  s0    t | j }t|| j| jddd}|V  d S )NTr	   )ro   	word_wrappadding)rS   r/   rstripr   rn   ro   )r,   r7   r8   codesyntaxr"   r"   r%   r:      s   
zCodeBlock.__rich_console__N)r   r   r    r   r!   rh   )rn   rS   ro   rS   r!   r)   r?   )	r@   rA   rB   rF   rN   rD   r&   rY   r:   r"   r"   r"   r%   rh      s    
rh   c                   @  s2   e Zd ZdZdZdddZdddZdddZdS )
BlockQuotezA block quote.zmarkdown.block_quoter!   r)   c                 C     t  | _d S rP   r   elementsr,   r"   r"   r%   rY      rV   zBlockQuote.__init__r'   r(   r3   r   r4   c                 C     | j | dS NFry   rQ   r5   r"   r"   r%   r6         zBlockQuote.on_child_closer7   r   r8   r   r   c           	      c  sd    |j |jd d}|j| j|| jd}| j}td}td|}|D ]}|V  |E d H  |V  q"d S )N   widthrO   
u   ▌ )update	max_widthrender_linesry   rO   r   )	r,   r7   r8   render_optionslinesrO   r   rr   liner"   r"   r%   r:      s   

zBlockQuote.__rich_console__Nr!   r)   r>   r?   )r@   rA   rB   rF   rN   rY   r6   r:   r"   r"   r"   r%   rv      s    

rv   c                   @  s   e Zd ZdZdZdd	d
ZdS )HorizontalRulez%A horizontal rule to divide sections.Fr7   r   r8   r   r!   r   c                 c  s     |j ddd}t|dV  d S )Nzmarkdown.hrrH   defaultr   )	get_styler   )r,   r7   r8   rO   r"   r"   r%   r:      s   zHorizontalRule.__rich_console__Nr?   )r@   rA   rB   rF   r   r:   r"   r"   r"   r%   r      s    r   c                   @  s.   e Zd ZdZdddZdddZdddZdS )TableElementz.MarkdownElement corresponding to `table_open`.r!   r)   c                 C  s   d | _ d | _d S rP   )headerbodyrz   r"   r"   r%   rY      rp   zTableElement.__init__r'   r(   r3   r   r4   c                 C  s0   t |tr
|| _dS t |tr|| _dS td)Nz Couldn't process markdown table.F)rR   TableHeaderElementr   TableBodyElementr   RuntimeErrorr5   r"   r"   r%   r6      s   

zTableElement.on_child_closer7   r   r8   r   r   c                 c  s|    t tjd}| jd ur | jjd ur | jjjD ]}||j q| jd ur9| jj	D ]}dd |jD }|j
|  q)|V  d S )Nr
   c                 S  s   g | ]}|j qS r"   )content).0elementr"   r"   r%   
<listcomp>   s    z1TableElement.__rich_console__.<locals>.<listcomp>)r   r   SIMPLE_HEAVYr   rowcells
add_columnr   r   rowsadd_row)r,   r7   r8   tablecolumnr   row_contentr"   r"   r%   r:      s   

zTableElement.__rich_console__Nr   r>   r?   )r@   rA   rB   rF   rY   r6   r:   r"   r"   r"   r%   r      s
    

	r   c                   @  $   e Zd ZdZdddZdddZdS )r   z@MarkdownElement corresponding to `thead_open` and `thead_close`.r!   r)   c                 C  s
   d | _ d S rP   )r   rz   r"   r"   r%   rY     rZ   zTableHeaderElement.__init__r'   r(   r3   r   r4   c                 C  s   t |tsJ || _dS r|   )rR   TableRowElementr   r5   r"   r"   r%   r6     s   z!TableHeaderElement.on_child_closeNr   r>   r@   rA   rB   rF   rY   r6   r"   r"   r"   r%   r         
r   c                   @  r   )r   z@MarkdownElement corresponding to `tbody_open` and `tbody_close`.r!   r)   c                 C  
   g | _ d S rP   )r   rz   r"   r"   r%   rY     rZ   zTableBodyElement.__init__r'   r(   r3   r   r4   c                 C     t |tsJ | j| dS r|   )rR   r   r   rQ   r5   r"   r"   r%   r6        zTableBodyElement.on_child_closeNr   r>   r   r"   r"   r"   r%   r     r   r   c                   @  r   )r   z:MarkdownElement corresponding to `tr_open` and `tr_close`.r!   r)   c                 C  r   rP   )r   rz   r"   r"   r%   rY     rZ   zTableRowElement.__init__r'   r(   r3   r   r4   c                 C  r   r|   )rR   TableDataElementr   rQ   r5   r"   r"   r%   r6      r   zTableRowElement.on_child_closeNr   r>   r   r"   r"   r"   r%   r     r   r   c                   @  s2   e Zd ZdZeddd	ZdddZdddZdS )r   z[MarkdownElement corresponding to `td_open` and `td_close`
    and `th_open` and `th_close`.r   r   r    r   r!   r   c                 C  s\   t |jdp	d}d|v rd}nd|v rd}n	d|v rd}nd	}|ttv s)J | |d
S )NrO   re   ztext-align:rightrightztext-align:centerrb   ztext-align:leftrJ   r   rK   )rS   attrsgetr   r   )r$   r   r    rO   rL   r"   r"   r%   r&   *  s   
zTableDataElement.createrL   r   r)   c                 C  s   t d|d| _|| _d S )Nre   rK   )r   r   rL   rX   r"   r"   r%   rY   ;  s   
zTableDataElement.__init__r'   r(   r/   r   c                 C  s2   t |tr	t|n|}||j | j| d S rP   )rR   rS   r   stylizerT   r   append_textr0   r"   r"   r%   r1   ?  s   zTableDataElement.on_textNr;   r[   r=   )r@   rA   rB   rF   rD   r&   rY   r1   r"   r"   r"   r%   r   &  s    
r   c                   @  s<   e Zd ZdZedddZd ddZd!ddZd"ddZdS )#ListElementzA list element.r   r   r    r   r!   c                 C  s   | |j t|jddS )Nstartr	   )typeintr   r   r#   r"   r"   r%   r&   H  s   zListElement.create	list_typerS   
list_start
int | Noner)   c                 C  s   g | _ || _|| _d S rP   )itemsr   r   )r,   r   r   r"   r"   r%   rY   L  s   
zListElement.__init__r'   r(   r3   r   r4   c                 C  r   r|   )rR   ListItemr   rQ   r5   r"   r"   r%   r6   Q  r   zListElement.on_child_closer7   r   r8   r   r   c                 c  s    | j dkr| jD ]}|||E d H  q	d S | jd u rdn| j}|t| j }t| jD ]\}}||||| |E d H  q-d S )Nbullet_list_openr	   )r   r   render_bulletr   len	enumeraterender_number)r,   r7   r8   itemnumberlast_numberindexr"   r"   r%   r:   V  s   

zListElement.__rich_console__N)r   r   r    r   r!   r   )r   rS   r   r   r!   r)   r>   r?   )	r@   rA   rB   rF   rD   r&   rY   r6   r:   r"   r"   r"   r%   r   E  s    

r   c                   @  s<   e Zd ZdZdZdddZdddZdddZdddZdS )r   zAn item in a list.zmarkdown.itemr!   r)   c                 C  rw   rP   rx   rz   r"   r"   r%   rY   j  rV   zListItem.__init__r'   r(   r3   r   r4   c                 C  r{   r|   r}   r5   r"   r"   r%   r6   m  r~   zListItem.on_child_closer7   r   r8   r   r   c                 c  s    |j |jd d}|j| j|| jd}|jddd}td|}td|}td	}t|D ]\}	}
|	r5|n|V  |
E d H  |V  q-d S )
N   r   r   zmarkdown.item.bulletrH   r   u    • z   r   )r   r   r   ry   rO   r   r   r   )r,   r7   r8   r   r   bullet_stylebulletrr   r   firstr   r"   r"   r%   r   q  s   


zListItem.render_bulletr   r   r   c                 c  s    t t|d }|j|j| d}|j| j|| jd}|jddd}td}	td| |}
t| 	|d	 d |}t
|D ]\}}|rG|n|
V  |E d H  |	V  q?d S )
N   r   r   zmarkdown.item.numberrH   r   r   ri   r	   )r   rS   r   r   r   ry   rO   r   r   rjustr   )r,   r7   r8   r   r   number_widthr   r   number_styler   rr   numeralr   r   r"   r"   r%   r   ~  s   
zListItem.render_numberNr   r>   r?   )
r7   r   r8   r   r   r   r   r   r!   r   )	r@   rA   rB   rF   rN   rY   r6   r   r   r"   r"   r"   r%   r   e  s    


r   c                   @  s$   e Zd ZedddZdddZdS )Linkr   r   r    r   r!   r   c                 C  s   |j dd}| |jt|S )Nhref#)r   r   r   rS   )r$   r   r    urlr"   r"   r%   r&     s   zLink.creater/   rS   r   c                 C  s   t || _|| _d S rP   )r   r/   r   )r,   r/   r   r"   r"   r%   rY     s   

zLink.__init__Nr;   )r/   rS   r   rS   )r@   rA   rB   rD   r&   rY   r"   r"   r"   r%   r     s    r   c                      sL   e Zd ZdZdZedd	d
Zd fddZd fddZd ddZ	  Z
S )!	ImageItemz#Renders a placeholder for an image.Fr   r   r    r   r!   r   c                 C  s   | t |jdd|jS )zFactory to create markdown element,

        Args:
            markdown (Markdown): The parent Markdown object.
            token (Any): A token from markdown-it.

        Returns:
            MarkdownElement: A new markdown element
        srcre   )rS   r   r   
hyperlinksr#   r"   r"   r%   r&     s   zImageItem.createdestinationrS   r   r4   r)   c                   s    || _ || _d | _t   d S rP   )r   r   linkr_   rY   )r,   r   r   r`   r"   r%   rY     s   zImageItem.__init__r'   r(   c                   s&   |j j| _tdd| _t | d S rI   )rT   r   r   r/   r_   r-   r+   r`   r"   r%   r-     s   
zImageItem.on_enterr7   r   r8   r   r   c                 c  sf    t | jp	| jp	d d}| jpt| jdddd }| jr%|| tj	d|ddd}|V  d S )	Nr   /r	   u   🌆 ri   re   )end)
r   r   r   r/   r   striprsplitr   r   assemble)r,   r7   r8   
link_styletitler/   r"   r"   r%   r:     s   "

zImageItem.__rich_console__r;   )r   rS   r   r4   r!   r)   r<   r?   )r@   rA   rB   rF   r   rD   r&   rY   r-   r:   rg   r"   r"   r`   r%   r     s    r   c                   @  sL   e Zd ZdZ		ddddZed ddZd!ddZd"ddZd ddZ	dS )#r(   z!Manages the console render state.Nmonokair7   r   r8   r   rO   r   inline_code_lexer
str | Noneinline_code_themerS   r!   r)   c                 C  sD   || _ || _t|| _t | _d | _|d ur td||d| _d S d S )Nre   )ro   )r7   r8   r   style_stackr   stack_syntaxr   )r,   r7   r8   rO   r   r   r"   r"   r%   rY     s   
zMarkdownContext.__init__c                 C  s   | j jS )z>Current style which is the product of all styles on the stack.)r   currentrz   r"   r"   r%   rT     s   zMarkdownContext.current_styler/   	node_typec                 C  s\   |dv r$| j dur$| j |}|  | jj| tj|| jj	d dS | jj| | dS )z#Called when the parser visits text.>   fencecode_inlineNr   )
r   	highlightrs   r   topr1   r   r   r   r   )r,   r/   r   highlight_textr"   r"   r%   r1     s   zMarkdownContext.on_textrN   str | Stylec                 C  s"   | j j|dd}| j| | jS )zEnter a style context.rH   r   )r7   r   r   pushrT   )r,   rN   rO   r"   r"   r%   rM     s   zMarkdownContext.enter_stylec                 C  s   | j  }|S )zLeave a style context.)r   pop)r,   rO   r"   r"   r%   rU     s   
zMarkdownContext.leave_style)Nr   )r7   r   r8   r   rO   r   r   r   r   rS   r!   r)   )r!   r   )r/   rS   r   rS   r!   r)   )rN   r   r!   r   )
r@   rA   rB   rF   rY   propertyrT   r1   rM   rU   r"   r"   r"   r%   r(     s    

r(   c                   @  s   e Zd ZU dZi dedededededede	d	e	d
e
dededededededeZded< h dZ						d4d5d'd(Zd6d+d,Zd7d2d3ZdS )8r   a  A Markdown renderable.

    Args:
        markup (str): A string containing markdown.
        code_theme (str, optional): Pygments theme for code blocks. Defaults to "monokai". See https://pygments.org/styles/ for code themes.
        justify (JustifyMethod, optional): Justify value for paragraphs. Defaults to None.
        style (Union[str, Style], optional): Optional style to apply to markdown.
        hyperlinks (bool, optional): Enable hyperlinks. Defaults to ``True``.
        inline_code_lexer: (str, optional): Lexer to use if inline code highlighting is
            enabled. Defaults to None.
        inline_code_theme: (Optional[str], optional): Pygments theme for inline code
            highlighting, or None for no highlighting. Defaults to None.
    paragraph_openheading_openr   
code_blockblockquote_openhrr   ordered_list_openlist_item_openimage
table_open
tbody_open
thead_opentr_opentd_openth_openz*ClassVar[dict[str, type[MarkdownElement]]]ry   >   semrt   strongr   NrH   TmarkuprS   rl   rL   JustifyMethod | NonerO   r   r   r4   r   r   r   r!   r)   c           	      C  sP   t  dd}|| _||| _|| _|| _|| _|| _|| _	|p$|| _
d S )Nstrikethroughr   )r   enabler   parseparsedrl   rL   rO   r   r   r   )	r,   r   rl   rL   rO   r   r   r   parserr"   r"   r%   rY     s   
zMarkdown.__init__tokensIterable[Token]c                 c  sL    |D ] }|j dk}|jdk}|jr |s |s | |jE dH  q|V  qdS )zFlattens the token stream.r   imgN)r   r]   children_flatten_tokens)r,   r  r    is_fenceis_imager"   r"   r%   r
  *  s   

zMarkdown._flatten_tokensr7   r   r8   r   r   c                 c  s   |j | jdd}|jdd}t|||| j| jd}| j}| j}d}t	 }| 
|D ]}	|	j}
|	j}|	jdk}|	jdk}|	jd	k}|
d
krO||	j|
 q+|
dkrZ|d|
 q+|
dkre|d|
 q+|
dkrt|	jdd}| jr|j ddd}|t|d7 }|| q+|jt| |	 q+|
dkr| jr|  q+|j }t|tsJ |j ddd}|| ||jj|
 |  |d|
 |j ddd}|| ||j|
 |  |d|
 q+||v r#|
dkr#|
dkr#|r|d|  q+|r|  q+|d|  |	jr||	j|
 |  q+| j |	jp,t!}|| |	}|s9|rD|j| |"| |rq|j }|j p\|jo\|jj#$||}|rp|rf|V  |%||j&E dH  n?|r|j  |	j}|dur||| |j p|jo|jj#$||}|r|r|
dkr|V  |%||j&E dH  |s|r|'| |j(}q+dS )zRender markdown to the console.rH   r   N)height)r   r   Fr	   r   r   r/   	hardbreakr   	softbreakri   	link_openr   re   zmarkdown.link_urlr   
link_closezmarkdown.linkz ()r   r   r^   inline))r   rO   r   r(   r   r   r  inlinesr   r   r
  r   r]   nestingr1   r   rS   r   r   r   r   rM   r   r   r   r&   rU   r   rR   r/   plainr   ry   rE   r-   r   r6   renderr8   r2   r   )r,   r7   r8   rO   r'   r  inline_style_tagsr   _new_line_segmentr    r   r]   enteringexitingself_closingr   r   r   link_url_styleelement_classshould_renderr/   r"   r"   r%   r:   4  s   


















zMarkdown.__rich_console__)r   NrH   TNN)r   rS   rl   rS   rL   r   rO   r   r   r4   r   r   r   r   r!   r)   )r  r  r!   r  r?   )r@   rA   rB   rF   rW   r\   rh   rv   r   r   r   r   r   r   r   r   r   ry   rC   r  rY   r
  r:   r"   r"   r"   r%   r     sZ   
 	


r   __main__z(Render Markdown to the console with Rich)descriptionpathPATHz%path to markdown file, or - for stdin)metavarhelpz-cz--force-colorforce_color
store_truezforce color for non-terminals)destactionr   r%  z-tz--code-themerl   r   zpygments code theme)r(  r   r%  z-iz--inline-code-lexerr   z-yz--hyperlinksr   zenable hyperlinks)r(  r)  r%  z-wz--widthr   z*width of output (default will auto-detect))r   r(  r   r%  z-jz	--justifyrL   zenable full text justifyz-pz--pagepagezuse pager to scroll output)r   -zutf-8)encodingfullrJ   )rL   rl   r   r   )fileforce_terminalr   T)r/  r   record)[
__future__r   systypingr   r   r   markdown_itr   markdown_it.tokenr   
rich.tabler   re   r   _loopr   _stackr   r7   r   r   r   r   
containersr   jupyterr   panelr   ruler   segmentr   rO   r   r   ru   r   r/   r   r   r   rE   rG   rW   r\   rh   rv   r   r   r   r   r   r   r   r   r   r   r(   r   r@   argparseArgumentParserr  add_argumentr   
parse_argsargsrich.consoler"  stdinreadmarkdown_bodyopenmarkdown_filerL   rl   r   r   r   r*  iopydocStringIOfileior&  r   printpagergetvaluer"   r"   r"   r%   <module>   s    9	#! *(0 
;



