def main():
    print ("Start of process...")
    
    #configuration parameters
    start = time.time()
    txt_path = config.conf["txt_path"]
    save_path = config.conf["save_path"]
    database_path = config.conf["database_path"]
    db_type = config.conf["db_type"]
    
    #use plaintext abstract factory
    txt_abs_factory = plaintext_abs_factory.plaintext_factory()
    txt_factory = txt_abs_factory.get_plaintext(txt_path)
    txt_prod = txt_factory.get_txt()
    URLs = txt_prod.get_lines()
    #use images abstract factory
    init_pics = Pic_Handler(URLs,save_path)
    pics_info = init_pics.pic_info()
    init_pics.pic_save()
    #use database abstract factory
    db_abs_factory = database_abs_factory.database_factory()
    db_factory = db_abs_factory.db_abs_fac(db_type,database_path)
    db_prod = db_factory.process_sql()
    db_prod.create_db()
    db_prod.populate_db(pics_info)
    
    print ("End of process" )
    end = time.time()
    print ("Process time: ", str(round(end-start,2)),"sec")
    raw_input("Press enter to exit.")       
 def setUp(self):
     self.__path = "test_files/test_txt.txt"
     self.__txt_abs_factory = plaintext_abs_factory.plaintext_factory()
     self.__txt_factory = self.__txt_abs_factory.get_plaintext(self.__path)
     self.__txt_prod = self.__txt_factory.get_txt()