Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8149958
commit 02b5d40
Showing
8 changed files
with
68 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ beancount_import/frontend_dist | |
.coverage | ||
htmlcov/ | ||
.*.ofx | ||
*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
1900-01-01 open Liabilities:Credit-Card EUR | ||
ofx_org: "" | ||
ofx_broker_id: "" | ||
ofx_account_type: "cash_only" | ||
account_id: "99999999999" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
include "accounts.beancount" | ||
include "transactions.beancount" | ||
include "prices.beancount" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import glob | ||
import os | ||
import json | ||
import sys | ||
|
||
from beancount_import.source.ofx import convert2ofx | ||
|
||
def run_reconcile(extra_args): | ||
import beancount_import.webserver | ||
|
||
journal_dir = os.path.dirname(__file__) | ||
data_dir = os.path.join(os.path.dirname(__file__), '..', '..', 'testdata', 'source', 'icscards') | ||
force = False | ||
|
||
data_sources = [ | ||
dict( | ||
module='beancount_import.source.ofx', | ||
ofx_filenames=( | ||
convert2ofx('nl-icscards', glob.glob(os.path.join(data_dir, 'icscards.txt')), force) | ||
), | ||
checknum_numeric=lambda ofx_filename: False, | ||
check_balance=lambda ofx_filename: False, | ||
), | ||
] | ||
|
||
beancount_import.webserver.main( | ||
extra_args, | ||
journal_input=os.path.join(journal_dir, 'journal.beancount'), | ||
ignored_journal=os.path.join(journal_dir, 'ignored.beancount'), | ||
default_output=os.path.join(journal_dir, 'transactions.beancount'), | ||
open_account_output_map=[ | ||
('.*', os.path.join(journal_dir, 'accounts.beancount')), | ||
], | ||
balance_account_output_map=[ | ||
('.*', os.path.join(journal_dir, 'accounts.beancount')), | ||
], | ||
price_output=os.path.join(journal_dir, 'prices.beancount'), | ||
data_sources=data_sources, | ||
) | ||
|
||
|
||
if __name__ == '__main__': | ||
run_reconcile(sys.argv[1:]) |
Empty file.