#NEWLINE# def main( ) : #NEWLINE# #INDENT# 'Main Function' #NEWLINE# parser = argparse . ArgumentParser ( ) #NEWLINE# parser . add_argument ( '-i' , '--input' , required = True ) #NEWLINE# parser . add_argument ( '-o' , '--output' , default = False ) #NEWLINE# parser . add_argument ( '-n' , '--output_file_name' , default = 'out.txt' ) #NEWLINE# parser . add_argument ( '-f' , '--fail_if_empty' , action = 'store_true' , default = False ) #NEWLINE# parser . add_argument ( 'paths' , nargs = '*' , help = ( 'Instead of profiling, you ' + 'can check whether paths exist.' ) ) #NEWLINE# args = parser . parse_args ( ) #NEWLINE# input_dir = ( getenv ( args . input ) if getenv ( args . input ) else parser . input ) #NEWLINE# if ( len ( args . paths ) > 0 ) : #NEWLINE# #INDENT# paths_exist ( input_dir , args . paths ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# assert args . output , 'Output directory was not provided.' #NEWLINE# output_dir = ( getenv ( args . output ) if getenv ( args . output ) else args . output ) #NEWLINE# profile_input ( input_dir , output_dir , args . output_file_name , args . fail_if_empty )