Name NLB uploads izpisek_YYYY-MM-DD
Back to the dashed date rename_izpiski.py used, so a statement the script already named is recognised as already there when it is uploaded again, rather than landing as a second copy under the underscored name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -65,7 +65,7 @@ func (p *nlbParser) Parse(path string, acc *config.Account) ([]RawTxn, error) {
|
||||
return parseNLBText(text, p.digits)
|
||||
}
|
||||
|
||||
// StatementName names an izpisek after its statement date, izpisek_YYYY_MM_DD,
|
||||
// StatementName names an izpisek after its statement date, izpisek_YYYY-MM-DD,
|
||||
// so the folder sorts by date and two downloads of one statement collide.
|
||||
func (p *nlbParser) StatementName(path string) (string, error) {
|
||||
text, err := pdfToText(path)
|
||||
@@ -80,7 +80,7 @@ func nlbStatementName(text string) string {
|
||||
if m == nil {
|
||||
return ""
|
||||
}
|
||||
return fmt.Sprintf("izpisek_%s_%s_%s", m[3], m[2], m[1])
|
||||
return fmt.Sprintf("izpisek_%s-%s-%s", m[3], m[2], m[1])
|
||||
}
|
||||
|
||||
// parseNLBText holds the whole parser, separated from PDF extraction so it can
|
||||
|
||||
Reference in New Issue
Block a user