def main():
    years = [ "111", "110","109", "108"] 

    reports_base=configuration.get_path_to_reports()
    bills2008 = os.path.join(configuration.get_path_to_bills(), "/110/bills/hr/hr2764/text-versions/")
    bills2009 = os.path.join(configuration.get_path_to_bills(), "/111/bills/hr/hr1105/text-versions/")


    conn = psycopg2.connect(CONN_STRING)

    insert_all(bills2008, conn);
    insert_all(bills2009, conn);

    for year in years:
       insert_all(reports_base+year+"/", conn);
    conn.close()
Ejemplo n.º 2
0
 def __init__(self, path="", rootDir=configuration.get_path_to_bills()):
     self.path = path
     self.rootDir = rootDir
     self.CONN_STRING = configuration.get_connection_string()
     if not self.rootDir.endswith('/'):
         self.rootDir += '/'
 def __init__(self, path="", rootDir=configuration.get_path_to_bills()):
     self.path = path
     self.rootDir = rootDir
     self.CONN_STRING = configuration.get_connection_string()
     if not self.rootDir.endswith('/'):
         self.rootDir += '/'