
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
3
v:U] $  ã               @   s0   d dl Z d dlZd dlmZmZmZ dd„ ZdS )é    N)Ú	HTML2TextÚ__version__Úconfigc        	      C   s¼  d} G dd„ dƒ}t jƒ }|jddtjdd� |jdd	d
tjdd� |jdddtjdd� |jddd
tjdd� |jddd
tjdd� |jdddtj	dd� |jddd
tj
dd� |jddd
tjdd� |jd d!d
tjd"d� |jd#d$d
tjd%d� |jd&d'd
tjd(d� |jd)d*d
tjd+d� |jd,d-d
d.d/d0d1� |jd2d3d
d4d/d5d1� |jd6d7d
d8d/d9d1� |jd:d;d<ttjd=d>� |jd?d@dAttjdBd>� |jdCdDd
dEd/dFd1� |jdGd
dHd/dId1� |jdJd
dKtjdLd1� |jdMd
dNtjdOd1� |jdPd
dQtjdRd1� |jdSd
dTtjdUd1� |jdVddWtjdXd1� |jdYddZtjd[d1� |jd\d
d]tjd^d1� |jd_d
d`tjdad1� |jdbdctjddd� |jdedftjdgd� |jdhditjdjd� |jdkdldmjtt t!ƒƒdn� |jdodpdq� |jdrdpdsdt� |j"ƒ }|j#�r |j#duk�r t$|j#dvƒ�}|j%ƒ }W d Q R X nt&j'j(j%ƒ }y|j)|j*|j+ƒ}W n` t,k
�r  } zB|j-dw |j. }|dx|j/ 7 }|dy|j. dz 7 }t0|ƒ |‚W Y d d }~X nX t1| d{�}|j2�rºdu|_3|j4�rÎd||_5d}|_6|j7|_7|j8|_9|j:|_:|j;|_;|j<|_<|j=|_=|j>|_>|j?|_?|j@|_@|jA|_A|jB|_B|jC|_C|jD|_D|jE|_E|jF|_F|jG|_G|jH|_H|jI|_I|jJ|_J|jK|_K|jL|_L|jM|_M|jN|_N|jO|_O|jP|_P|jQ|_Q|jR|_Rt&jSjT|jU|ƒƒ d S )~NÚ c               @   s,   e Zd ZdZdZdZdZdZdZdZ	dZ
d	S )
zmain.<locals>.bcolorsz[95mz[94mz[92mz[93mz[91mz[0mz[1mz[4mN)Ú__name__Ú
__module__Ú__qualname__ZHEADERZOKBLUEÚOKGREENÚWARNINGZFAILÚENDCZBOLDZ	UNDERLINE© r   r   ú/usr/lib/python3.6/cli.pyÚbcolors
   s   r   z--default-image-altÚdefault_image_altz3The default alt string for images with missing ones)ÚdestÚdefaultÚhelpz--pad-tablesÚ
pad_tablesÚ
store_truez-pad the cells to equal column width in tables)r   Úactionr   r   z--no-wrap-linksÚ
wrap_linksZstore_falsez"don't wrap links during conversionz--wrap-list-itemsÚwrap_list_itemsz!wrap list items during conversionz--ignore-emphasisÚignore_emphasisz)don't include any formatting for emphasisz--reference-linksÚinline_linksz1use reference style links instead of inline linksz--ignore-linksÚignore_linksz&don't include any formatting for linksz--protect-linksÚprotect_linkszCprotect links from line breaks surrounding them with angle bracketsz--ignore-imagesÚignore_imagesz'don't include any formatting for imagesz--images-as-htmlÚimages_as_htmlzWAlways write image tags as raw html; preserves `height`, `width` and `alt` if possible.z--images-to-altÚimages_to_altz&Discard image data, only keep alt textz--images-with-sizeÚimages_with_sizezMWrite image tags with height and width attrs as raw html to retain dimensionsz-gz--google-docÚ
google_docFz(convert an html-exported Google Document)r   r   r   r   z-dz--dash-unordered-listÚul_style_dashz6use a dash rather than a star for unordered list itemsz-ez--asterisk-emphasisÚem_style_asteriskz=use an asterisk rather than an underscore for emphasized textz-bz--body-widthÚ
body_widthz3number of characters per output line, 0 for no wrap)r   Útyper   r   z-iz--google-list-indentÚlist_indentz,number of pixels Google indents nested listsz-sz--hide-strikethroughÚhide_strikethroughzDhide strike-through text. only relevant when -g is specified as wellz--escape-allÚescape_snobzbEscape all special characters.  Output is less readable, but avoids corner case formatting issues.z--bypass-tablesÚbypass_tablesz2Format tables in HTML rather than Markdown syntax.z--ignore-tablesÚignore_tableszAIgnore table-related tags (table, th, td, tr) while keeping rows.z--single-line-breakÚsingle_line_breakzhUse a single line break after a block element rather than two line breaks. NOTE: Requires --body-width=0z--unicode-snobÚunicode_snobzUse unicode throughout documentz--no-automatic-linksÚuse_automatic_linksz.Do not use automatic links wherever applicablez--no-skip-internal-linksÚskip_internal_linkszDo not skip internal linksz--links-after-paraÚlinks_each_paragraphz2Put links after each paragraph instead of documentz--mark-codeÚ	mark_codez.Mark program code blocks with [code]...[/code]z--decode-errorsÚdecode_errorszZWhat to do in case of decode errors.'ignore', 'strict' and 'replace' are acceptable valuesz--open-quoteÚ
open_quotez!The character used to open quotesz--close-quoteÚclose_quotez"The character used to close quotesz	--versionÚversionÚ.)r   r3   Úfilenameú?)ÚnargsÚencodingzutf-8)r7   r   ú-ÚrbzWarning:z	 Use the z--decode-errors=ignorez flag.)ÚbaseurlÚ*Ú__)VÚargparseÚArgumentParserÚadd_argumentr   ZDEFAULT_IMAGE_ALTZ
PAD_TABLESZ
WRAP_LINKSZWRAP_LIST_ITEMSZIGNORE_EMPHASISZINLINE_LINKSZIGNORE_ANCHORSZPROTECT_LINKSZIGNORE_IMAGESZIMAGES_AS_HTMLZIMAGES_TO_ALTZIMAGES_WITH_SIZEÚintZ
BODY_WIDTHZGOOGLE_LIST_INDENTZBYPASS_TABLESZIGNORE_TABLESZSINGLE_LINE_BREAKZUNICODE_SNOBZUSE_AUTOMATIC_LINKSZSKIP_INTERNAL_LINKSZLINKS_EACH_PARAGRAPHZ	MARK_CODEZDECODE_ERRORSZ
OPEN_QUOTEZCLOSE_QUOTEÚjoinÚmapÚstrr   Ú
parse_argsr5   ÚopenÚreadÚsysÚstdinÚbufferÚdecoder8   r0   ÚUnicodeDecodeErrorr
   r   r	   Úprintr   r!   Zul_item_markr"   Zemphasis_markZstrong_markr#   r%   Zgoogle_list_indentr   r   r   r   r   r   r   r    r&   r'   r(   r)   r*   r   r+   r,   r-   r.   r/   r   r   r   r   r1   r2   ÚstdoutÚwriteZhandle)	r;   r   ÚpÚargsÚfpÚdataÚerrZwarningÚhr   r   r   Úmain   sØ   

rV   )r>   rH   Z	html2textr   r   r   rV   r   r   r   r   Ú<module>   s   