bank2ynab icon indicating copy to clipboard operation
bank2ynab copied to clipboard

Improve forced changes by clean_strings()

Open ThomDietrich opened this issue 1 year ago • 2 comments

https://github.com/bank2ynab/bank2ynab/blob/323e843bdde8e2ee5e49b21aa69646c8da0c07c6/bank2ynab/dataframe_handler.py#L415-L441

Hey @nocalla, can we discuss the use of clean_strings for the Memo field as well as for the Payee field?

Imho it does not make sense. Is any of it needed to be accepted by the YNAB API? Some Examples:

  • From: "Vertrag AS-93141912345 Privat-, Berufs- und Verkehrs-Rech 22.07.24 - 21.08.24" To: "Vertrag As 9314197257 Privat Berufs Und Verkehrs Rech 22 08 24 21 09 24"
  • From: "303-3731234-4960341 AMZN Mktp DE 7D3G7JTKY5" To: "303 3731234 4960341 Amzn Mktp De 7D3G7Jtky5"

I would agree with the latter modifications but I have just disabled the first two in my instance.

ThomDietrich avatar Aug 24 '24 18:08 ThomDietrich

To be perfectly honest, I can't remember. The API documentation on what's allowed for transactions is poor and we had to do a lot of juggling around to accommodate the API's requirements.

This is a question of taste really - personally, I actually like this function as one of my banks reports details all in uppercase and I'd rather not have my bank statement shouting at me.

nocalla avatar Aug 24 '24 20:08 nocalla

I see what you mean. Another bank of mine indeed does that. However, my main one doesn't and the modifications posted above are just too strange. In that case the function almost feels like a bug to me. No offense.

Would you consider making this an option per bank in bank2ynab.conf?

ThomDietrich avatar Aug 25 '24 08:08 ThomDietrich