feat: Parser-Basis, Bank-Erkennung, Saldo-/Duplikat-Pruefung
- 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>
This commit is contained in:
12
finance/app/parsers/detect.py
Normal file
12
finance/app/parsers/detect.py
Normal file
@@ -0,0 +1,12 @@
|
||||
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
|
||||
Reference in New Issue
Block a user