Ally savings-only statements: separate account per savings number, own coverage row
build-container / build (push) Successful in 39s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 5.5 committed 2026-10-21 19:04:19 -04:00
1 parent 1f556bccfa
commit 5425d9913a
2 files changed
+8 -4

No files matched your search

+4 -1
View File
@@ -135,10 +135,13 @@ def parse_ally(path, pages):
bal = g(r"Ending Balance, as of \S+ \$([\d,]+\.\d\d)")
if bal is None: continue
apy = re.search(r"Annual Percentage Yield Earned ([\d.]+)%", sec)
st.snaps.append(dict(account="Ally " + re.sub(r" Account$", "", prod), group="Savings", date=end, balance=bal,
num = re.search(r"Account Number: x+(\d{4})", full[max(0, h.start() - 200): h.start()]) # last 4 digits tell several savings accounts apart
st.snaps.append(dict(account="Ally " + re.sub(r" Account$", "", prod) + (f" ({num.group(1)})" if num else ""), group="Savings", date=end, balance=bal,
interest=g(r"Interest Paid This Period \$([\d,]+\.\d\d)"), ytd=g(r"Interest Paid Year to Date \$([\d,]+\.\d\d)"),
deposits=g(r"Deposits and Other Credits \$([\d,]+\.\d\d)"), withdrawals=g(r"Withdrawals and Other Debits -?\$([\d,]+\.\d\d)"),
rate=float(apy.group(1)) if apy else None))
if not any(re.match(r"spending", h.group(1).strip(), re.I) for h in heads) and st.snaps:
st.account, st.stated_out = st.snaps[0]["account"], None # a savings-only statement: its own account in the coverage grid, not Ally Checking
return st
CV_TX = re.compile(r"^(\d\d/\d\d/\d{4}) (.+?) \$([\d,]+\.\d\d) \$([\d,]+\.\d\d)$")