- ParsedTransaction und ParsedStatement Datenklassen - parse_german_amount(): German format number parsing (1.234,56 -> Decimal) - parse_german_date(): DD.MM.YYYY date parsing with optional year - detect_bank(): Recognize VR/HVB/DKB from text markers - balance_difference(): Validate statement balance consistency - dedup_hash(): SHA256-based transaction deduplication Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
13 lines
335 B
Python
13 lines
335 B
Python
MARKERS = [
|
|
("vr", ["Volksbank", "Raiffeisenbank", "VR-Bank", "VR Bank"]),
|
|
("hvb", ["HypoVereinsbank", "UniCredit"]),
|
|
("dkb", ["Deutsche Kreditbank", "DKB"]),
|
|
]
|
|
|
|
|
|
def detect_bank(text: str) -> str | None:
|
|
for bank, needles in MARKERS:
|
|
if any(n in text for n in needles):
|
|
return bank
|
|
return None
|