Transactions table (#7)
Reviewed-on: #7 Co-authored-by: Mathias <mathias2784@web.de>
This commit was merged in pull request #7.
This commit is contained in:
+12
-6
@@ -1,6 +1,7 @@
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
|
||||
from src.db import get_session
|
||||
from src.ingest.b4w import ingest_b4w
|
||||
from src.ingest.comdirect import ingest_comdirect
|
||||
from src.models.settings import Account
|
||||
@@ -19,17 +20,22 @@ def main():
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.input_b4w:
|
||||
ingest_b4w(Path(args.input_b4w))
|
||||
with get_session() as session:
|
||||
ingest_b4w(Path(args.input_b4w), session)
|
||||
if args.input_comdirect:
|
||||
import settings
|
||||
|
||||
giro_account = settings.BANK_ACCOUNTS["comdirect"].get_account("Girokonto")
|
||||
assert isinstance(giro_account, Account)
|
||||
ingest_comdirect(
|
||||
Path(args.input_comdirect),
|
||||
account_iban=giro_account.iban or "",
|
||||
account_currency=giro_account.currency or "",
|
||||
)
|
||||
with get_session() as session:
|
||||
ingest_comdirect(
|
||||
session,
|
||||
Path(args.input_comdirect),
|
||||
account_iban=giro_account.iban or "",
|
||||
account_currency=(
|
||||
giro_account.currency.value if giro_account.currency else ""
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user