#NEWLINE# def run( ) : #NEWLINE# #INDENT# if len ( sys . argv [ 1 : ] ) : #NEWLINE# #INDENT# baseFolderPath = sys . argv [ 1 ] #NEWLINE# if ( baseFolderPath [ ( - 1 ) ] == '/' ) : #NEWLINE# #INDENT# baseFolderPath = baseFolderPath [ : ( - 1 ) ] #NEWLINE# #UNINDENT# if ( not os . path . isdir ( baseFolderPath ) ) : #NEWLINE# #INDENT# print ( 'Invalid directory.' ) #NEWLINE# return #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# baseFolderPath = os . getcwd ( ) #NEWLINE# #UNINDENT# t1 = time . time ( ) #NEWLINE# getFontPaths ( os . path . abspath ( baseFolderPath ) ) #NEWLINE# if len ( fontsList ) : #NEWLINE# #INDENT# doTask ( fontsList ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# print ( 'No fonts found.' ) #NEWLINE# return #NEWLINE# #UNINDENT# t2 = time . time ( ) #NEWLINE# elapsedSeconds = ( t2 - t1 ) #NEWLINE# if ( ( elapsedSeconds / 60 ) < 1 ) : #NEWLINE# #INDENT# print ( ( '\nCompleted in %.1f seconds.' % elapsedSeconds ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# print ( ( '\nCompleted in %.1f minutes.' % ( elapsedSeconds / 60 ) ) )