
    Pix                    4    d Z ddlmZ ddlmZmZ dgZdd	Zd
S )ziconv handler for Dippy.    )annotations)ClassificationHandlerContexticonvctxr   returnr   c                   | j         }d}d}|t          |          k     r||         }|dk    s|dk    r'|dz   t          |          k     r||dz            }|dz  }N|                    d          r|dd         }|dz  }s|                    d          r|dd         }|dz  }|dz  }|t          |          k     |rt          dd	|f
          S t          dd          S )zClassify iconv command for safety.

    iconv converts text encoding. Safe by default (writes to stdout),
    but -o/--output writes to a file which needs redirect rule checking.
    N   z-oz--output   z	--output=	   allowziconv -o)descriptionredirect_targetsr   )r   )tokenslen
startswithr   )r   r   output_fileits        0/root/projects/gits/Dippy/src/dippy/cli/iconv.pyclassifyr   
   s#    ZF K	A
c&kk//1I99Z1us6{{""$QUmFA<< 	ABB%KFA<<$$ 	ABB%KFA	Q c&kk//"  
")^
 
 
 	
 'w7777    N)r   r   r   r   )__doc__
__future__r   	dippy.clir   r   COMMANDSr    r   r   <module>r      sZ      " " " " " " 4 4 4 4 4 4 4 49#8 #8 #8 #8 #8 #8r   