<s> import glob <EOL> import os <EOL> import sys <EOL> from parse_government_bill_pdf import GovProposalParser <EOL> from parse_government_bill_pdf import readable as d <EOL> from util import flatten <EOL> def show_one ( pdf_filename , show_details = False ) : <EOL> prop = GovProposalParser ( pdf_filename ) <EOL> print prop . to_unicode ( show_details ) . encode ( '<STR_LIT:utf-8>' ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> if len ( sys . argv ) == <NUM_LIT:1> : <EOL> files = sorted ( glob . glob ( '<STR_LIT>' ) ) <EOL> else : <EOL> files = sys . argv [ <NUM_LIT:1> : ] <EOL> for pdf_filename in files : <EOL> if not os . path . exists ( pdf_filename ) : <EOL> print "<STR_LIT>" % ( pdf_filename ) <EOL> show_one ( pdf_filename , show_details = True ) </s>
