mς
=ψAc           @   sL   d  k  Z  h  Z h  d d <e d <h  d d <e d <d f  d     YZ d  S(   Nt   ens/   If you continue, you will overwrite the file : t	   overwrites   You can't write the file : t	   cantwritet   Messagec           B   st   t  Z d  Z d d  Z d   Z d d  Z d   Z d   Z d   Z d	   Z	 d d d
  Z
 d   Z d   Z RS(   s   Class to manage the messageR    c         C   s   | |  _  d  S(   N(   t   langt   self(   R   R   (    (    t!   /home/lathuili/fractal/message.pyt   __init__   s    c         C   s'   |  i d j o	 d GHn |  i   d  S(   NR    s  NAME : 
	dim_frac

SYNOPSIS :
	dim_frac argument [options]


DESCRIPTION :
	dim_frac is a free software under GPL licence for fractal dimension computation. dim_frac can also generate the graph to see if the regression is correct.
	

ARGUMENT :
	It must be an image supported by the ImageMagic Package (It includes png, bmp, tiff, jpeg, ...)

OPTIONS :
	-f, --force : don't ask before overwriting a file
	-h, --help : print this help
	-o, --output : This option allows to choose the type of the output. The default value is 'text'. 
		       The different parameters are :
			all : all the available exportation
			text : it only print the result
			window : it open a Window with the graph
			png : it exports the graph in png file
			jpeg : it exports the graph in jpeg file
			svg : it exports the graph in svg file (vectorial format)
			fig : it exports the graph in fig file (for xfig)
	--output2 : It's like the option --output except all : it's usefull, if you want export to more than one format.
	--output3 : ...

	--output_name : This option allows to define the name of the output without the extension which you can not define. By this way you can choose the directory where you want to save the files.

	-m, --method : This option allows to choose the method for the box size sampling. The default method is pair
			The different methods are :
			all : We sample all the size, (good, but very long)
			pair : We sample only the pair size.
			exponential : We sample the power of the precision.



	-p,--precision : Define the precision (a float strictly between 1 and 2). The default value is 1.2.

EXEMPLES :

frac_dim my_picture.png

frac_dim my_picture.png -o text --output2 window --output3 svg --output_name my_export  -m all

frac_dim my_picture.png -o all -m exponential --precision=1.1 --force
(   R   R   t   Inexistante_language(   R   (    (    R   t   help   s    	4t    c         C   s+   |  i d j o d | GHn |  i   d  S(   NR    s   Invalid output : (   R   R   t   argumentR   (   R   R   (    (    R   t   invalid_outputL   s    c         C   s'   |  i d j o	 d GHn |  i   d  S(   NR    s   Invalid precision(   R   R   R   (   R   (    (    R   t   invalid_precisionT   s    	c         C   s'   |  i d j o	 d GHn |  i   d  S(   NR    s   Invalid algorithm(   R   R   R   (   R   (    (    R   t   invalid_algo\   s    	c         C   s7   |  i d j o d | d | d GHn |  i   d  S(   NR    s   The exportation of t   .s    failed!(   R   R   t   output_namet   outputR   (   R   R   R   (    (    R   t   failedd   s    c         C   s'   |  i d j o	 d GHn |  i   d  S(   NR    s   Invalid method(   R   R   R   (   R   (    (    R   t   invalid_methodl   s    	c         C   s   y t  | |  i | GHWn n X|  i d j o^ d GHt   } | d d g j o	 d GHq | d d g j o d GHt i   q |  i	   n |  i
   d  S(	   NR    s   Do you want to continue?[y,n]t   yt   Ys   let's got   nt   Ns   Good bye(   t   tablet   messageR   R   t	   file_namet	   raw_inputt   keyboardt   syst   exitt   doyouwanttocontinuR   (   R   R   R   R   (    (    R   R   s   s    		c         C   s1   |  i d j o	 d GHn |  i   t i   d  S(   NR    s   Non valid image!(   R   R   R   R   R   (   R   (    (    R   t   non_valid_argument   s    	
c         C   s	   d GHd  S(   Ns   Inexistante language(    (   R   (    (    R   R      s    (   t   __name__t
   __module__t   __doc__R   R	   R   R   R   R   R   R   R    R   (    (    (    R   R      s    	;					
(   R   R   R   (   R   R   R   (    (    R   t   ?   s   	
