to win32 systems) """ import os import sys from obp_config import TMP from libs.import_helper import show_here from libs.debugger import debug from selenium import webdriver # The csv will download the to tmp/csv/ TMP_SUFFIX ='csv' here = show_here() def check_for_clean_tmp(): """Check for an empty tmp/csv """ # This function will check that the tmp/csv folder is # empty. Else we'll have problem woring with the file. # Sanity Check #1: # Do we have tmp/ and tmp/csv # TODO: Move this to import_helper if os.path.exists(TMP) != True: os.makedirs(TMP) csv_save_path = os.path.join(os.getcwd(),TMP,TMP_SUFFIX)
#MongoDB Setting # Name of the Database and the Mongo Collection. # How to setup a MongoDB: # LINK: http://www.mongodb.org/display/DOCS/Quickstart MONGODB_DATABASE='OBP006' MONGODB_COLLECTION='obptransactions' # There Importer Version OBP_VERSION='0.0.1' # Files: # The Folder where the CSV file get saved SAVEDIR='' TMP = path.join(show_here(),'tmp/') # This can be used, to special a local file. # TODO: When this file is define. Don't run the postbank_importer CSV_FILE_PATH = 'usr/PB_Umsatzauskunft_198_rows.csv' # There is also the alterntiv of using a HTML file. This # would get parsed with BeautifulSoup and insert to the MongoDB HTML_FILE_PATH = '' # This need the Hostname of the Scala Host with the Port. SCALA_HOST='localhost' SCALA_PORT='8080' # Here you can define a file, where the sha512 hashes get saved for the JSON. # This will tracke the Transaction. This tryes to ensure, that we don't have double entrys.