24 lines
579 B
Plaintext
24 lines
579 B
Plaintext
|
#!/usr/bin/env python3
|
||
|
import argparse
|
||
|
|
||
|
import vanth.main
|
||
|
import vanth.ofxhome
|
||
|
import vanth.platform.ofxsource
|
||
|
|
||
|
|
||
|
def main():
|
||
|
vanth.main.setup_logging()
|
||
|
config = vanth.main.get_config()
|
||
|
vanth.main.create_db_connection(config)
|
||
|
|
||
|
parser = argparse.ArgumentParser()
|
||
|
parser.add_argument('dbfile', help='The database file of XML dumped from the open OFX Home DB')
|
||
|
args = parser.parse_args()
|
||
|
|
||
|
with open(args.dbfile, 'r') as f:
|
||
|
data = vanth.ofxhome.parse(f.read())
|
||
|
vanth.platform.ofxsource.ensure_exist(data)
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
main()
|