#NEWLINE# def main( ) : #NEWLINE# #INDENT# configure_logging ( ) #NEWLINE# arguments = parse_options ( ) #NEWLINE# if ( arguments . split == 'trip' ) : #NEWLINE# #INDENT# splitter = TripSplitter ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# splitter = TimeSplitter ( arguments . split ) #NEWLINE# #UNINDENT# for ( key , split ) in splitter . split ( arguments . files ) . items ( ) : #NEWLINE# #INDENT# with open ( ( '%s.json' % key ) , 'w' ) as output_file : #NEWLINE# #INDENT# for record in split : #NEWLINE# #INDENT# output_file . write ( ( JsonFormatter . serialize ( record ) + '\n' ) )