
     h                     |    d dl Z d dlZddlmZ d Zedk(  r& e j                   ee j                  dd              yy)    N   )	Premailerc           	          t        j                  d      }|j                  dddt        j                  d      dt        j
                  d	       |j                  d
ddt        j                  d      dt        j                  d	       |j                  ddt        d       |j                  dddd       |j                  ddddd       |j                  ddddd        |j                  d!dd"d#d$       |j                  d%dd&dd'       |j                  d(dd)dd*       |j                  d+dd,dd-       |j                  d.d/d0d12       |j                  d3dd4d52       |j                  d6d7d8d9:       |j                  d;d7d<d=:       |j                  d>d?d@g A       |j                  dBdddCdDE       |j                  dFdddGH       |j                  dIdJdKL       |j                  dMdddNH       |j                  dOdddPH       |j                  |       }|j                  r|j                  j                         |_	        |j                  j                         }t        |dQ      r|j                  dJ      }t        dVi d/|d|j                   d|j"                  d|j$                  d |j&                  d$|j(                  d'|j*                  d-|j,                  d8|j.                  d<|j0                  d0|j2                  d4|j4                  d?|j                  dC|j6                  dR|j8                  dS|j:                  }|j<                  j?                  |jA                  |jB                  |jD                  T             yU)Wa   Command-line tool to transform html style to inline css

    Usage::

        $ echo '<style>h1 { color:red; }</style><h1>Title</h1>' |         python -m premailer
        <h1 style="color:red"></h1>
        $ cat newsletter.html | python -m premailer
    zpython -m premailer [options])usagez-fz--file?rz0Specifies the input file.  The default is stdin.infile)nargstypehelpdefaultdestz-oz--outputwz2Specifies the output file.  The default is stdout.outfilez
--base-urlNbase_url)r   r   r   z--remove-internal-linksTz0Remove links that start with a '#' like anchors.preserve_internal_links)r   r   r   z--exclude-pseudoclassesFz5Pseudo classes like p:last-child', p:first-child, etc
store_trueexclude_pseudoclasses)r   r   actionr   z--preserve-style-tagsz:Do not delete <style></style> tags from the html document.keep_style_tagsz--remove-star-selectorsz?All wildcard selectors like '* {color: black}' will be removed.store_falseinclude_star_selectorsz--remove-classesz-Remove all class attributes from all elementsremove_classesz--capitalize-float-marginz>Capitalize float and margin properties for outlook.com compat.capitalize_float_marginz--strip-importantz-Remove '!important' for all css declarations.strip_importantz--methodhtmlmethodz=The type of html to output. 'html' for HTML, 'xml' for XHTML.)r   r   r   z--base-path	base_pathz*The base path for all external stylsheets.z--external-styleappendexternal_stylesz0The path to an external stylesheet to be loaded.)r   r   r   z
--css-textcss_textz#CSS text to be applied to the html.z--disable-basic-attributesdisable_basic_attributesz3Disable provided basic attributes (comma separated))r   r   r   z--disable-validationdisable_validationz5Disable CSSParser validation of attributes and values)r   r   r   r   z--prettyz Pretty-print the outputted HTML.)r   r   r   z
--encodingzutf-8z%Output encoding. The default is utf-8)r   r   z--allow-insecure-sslz4Skip SSL certificate verification for external URLs.z--allow-loading-external-filesz-Allow opening any non-HTTP external file URL.decodeallow_insecure_sslallow_loading_external_files)encodingpretty_printr    )#argparseArgumentParseradd_argumentFileTypesysstdinstdoutstr
parse_argsr"   splitr	   readhasattrr$   r   r   r   r   r   r   r   r   r    r!   r   r   r#   r%   r&   r   write	transformr'   pretty)argsparseroptionsr   ps        R/var/www/api/v1/venv_getwork_v1/lib/python3.12/site-packages/premailer/__main__.pymainr>      sk    $$+JKF
s#?		   s#A

   d:N
!?&	   !D$   I   !N%   <   #M&   <   L	   9	   ?	   2	   $'B	   !D   /	   g,S   C	   (<	   %G''+2+K+K+Q+Q+S(>> DtX{{7# 		!!	 !( ? ?	 &;;		
  //	  '==	 --	  //	  //	 !!	 ~~	 ##	 ")!A!A	 #55	 #55	  &-%I%I!	A$ OO	W--GNNK     __main__)r.   r*   	premailerr   r>   __name__exitargvr)   r?   r=   <module>rE      sA    
   |~ zCHHT#((12,  r?   