U
    ͔`	                     @   s    d dl mZ d dlZdd ZdS )    )runNc               
   C   sP  dd l } |  }|jddd |jddttdddd	d
 |jddtdddd |jdddd |jddddd |jddtddd |jddtdd d |jd!d"d#d |jd$d%t d&d' |	 }|j
r|j
d(d  d)krtd* zRt|j|j|j|j
|j|j|j|j|j	\}}}td+t|d, t| d-| W n    Y nX d S ).Nr   Wordsz}The words to produce you QR-code picture, like a URL or a sentence. Please read the README file for the supported characters.)helpz-vz	--version   )   zdThe version means the length of a side of the QR-Code picture. From little size to large is 1 to 40.)typechoicesdefaultr   z-lz--levelZLMQHHzUse this argument to choose an Error-Correction-Level: L(Low), M(Medium) or Q(Quartile), H(High). Otherwise, just use the default one: H)r   r	   r   z-pz	--picturezthe picture  e.g. example.jpgz-cz--colorizedZ
store_truezfProduce a colorized QR-Code with your picture. Just works when there is a correct '-p' or '--picture'.)Zactionr   z-conz
--contrastg      ?a   A floating point value controlling the enhancement of contrast. Factor 1.0 always returns a copy of the original image, lower factors mean less color (brightness, contrast, etc), and higher values more. There are no restrictions on this value. Default: 1.0)r   r	   r   z-briz--brightnessa  A floating point value controlling the enhancement of brightness. Factor 1.0 always returns a copy of the original image, lower factors mean less color (brightness, contrast, etc), and higher values more. There are no restrictions on this value. Default: 1.0z-nz--namezZThe filename of output tailed with one of {'.jpg', '.png', '.bmp', '.gif'}. eg. exampl.pngz-dz--directoryzThe directory of output.)r	   r   z.gifz/It may take a while, please wait for minutes...zSucceed! 
Check out your-zQR-code:)argparseZArgumentParserZadd_argumentintrangelistfloatosgetcwdZ
parse_argsZpictureprintr   r   versionlevelZ	colorizedZcontrastZ
brightnessnameZ	directorystr)r   Z	argparserargsZverZeclZqr_name r   //tmp/photos/amazing-qr-master/amzqr/terminal.pymain   s:    
"r   )Zamzqr.amzqrr   r   r   r   r   r   r   <module>   s   