
    k6d7                     r    d Z ddlZddlZddlmZmZ  ej                  e      Zd Z	d Z
edk(  r e
        yy)zZ
binaryornot.check
-----------------

Main code for checking if a file is binary or text.
    N)get_starting_chunkis_binary_stringc                 j    t         j                  dt                      t        |       }t	        |      S )zd
    :param filename: File to check.
    :returns: True if it's a binary file, otherwise False.
    zis_binary: %(filename)r)loggerdebuglocalsr   r   )filenamechunks     3/usr/lib/python3/dist-packages/binaryornot/check.py	is_binaryr      s,    
 LL*FH5 x(EE""    c            	          t        j                  d      } | j                  dd       | j                         }t	        t        di t        |             y )Nz3Check if a file passed as argument is binary or not)descriptionr	   zPFile name to check for. If the file is not in the same folder, include full path)help )argparseArgumentParseradd_argument
parse_argsprintr   vars)parserargss     r   mainr   %   sW    $$ 2A BF 
 *= > D	)
!d4j
!"r   __main__)__doc__loggingr   binaryornot.helpersr   r   	getLogger__name__r   r   r   r   r   r   <module>r!      sG      D 
		8	$#$# zF r   