#NEWLINE# def Parse( verbosity_level , reparse ) : #NEWLINE# #INDENT# global verbosity #NEWLINE# verbosity = int ( verbosity_level ) #NEWLINE# plenum = Committee . objects . filter ( type = 'plenum' ) [ 0 ] #NEWLINE# meetings = CommitteeMeeting . objects . filter ( committee = plenum ) . exclude ( protocol_text = '' ) #NEWLINE# if ( not reparse ) : #NEWLINE# #INDENT# meetings = meetings . annotate ( Count ( 'parts' ) ) . filter ( parts__count = 0 ) #NEWLINE# #UNINDENT# if ( verbosity > 1 ) : #NEWLINE# #INDENT# console = logging . StreamHandler ( ) #NEWLINE# console . setLevel ( logging . DEBUG ) #NEWLINE# logging . getLogger ( '' ) . addHandler ( console ) #NEWLINE# #UNINDENT# ( mks , mk_names ) = create_protocol_parts . get_all_mk_names ( ) #NEWLINE# for meeting in meetings : #NEWLINE# #INDENT# meeting . create_protocol_parts ( delete_existing = reparse , mks = mks , mk_names = mk_names )