Add simple script for inserting ofxsources

This only adds one institution that I care about, AFCU, but could be
extended to use the data from ofxhome.com. I downloaded the data from
them but found two problems. One, they work in XML, which I don't feel
like parsing, but two and far more importantly, they provide the second
piece of data I need, the routing number for the bank. That sucks. So
it's likely that if this project does well we will have more data than
them.
This commit is contained in:
Eli Ribble 2016-05-18 15:42:46 -06:00
parent 63a22e27e0
commit 4f3ef1b102
2 changed files with 39 additions and 4 deletions

View file

@ -11,11 +11,13 @@ import vanth.tables
LOGGER = logging.getLogger(__name__)
def create_application(config):
sepiida.log.setup_logging()
def create_db_connection(config):
engine = chryso.connection.Engine(config.db, vanth.tables)
chryso.connection.store(engine)
return engine
def create_application(config):
create_db_connection(config)
LOGGER.info("Starting up vanth version %s", vanth.version.VERSION)
application = vanth.server.create_app(config)
@ -23,11 +25,19 @@ def create_application(config):
return application
def main():
def setup_logging():
logging.getLogger().setLevel(logging.DEBUG)
logging.basicConfig()
config = sepiida.config.load('/etc/vanth.yaml', vanth.config.SPECIFICATION)
sepiida.log.setup_logging()
def get_config():
return sepiida.config.load('/etc/vanth.yaml', vanth.config.SPECIFICATION)
def main():
setup_logging()
config = get_config()
application = create_application(config)
try:
host = os.getenv('HOST', 'localhost')