PersonalFinance icon indicating copy to clipboard operation
PersonalFinance copied to clipboard

WIP: Support multiple CSV formats through configuration

Open jelleklaver opened this issue 3 years ago • 0 comments

Changed the setup so new CSV formats can be added with a simple configuration file. It is still work in progress, but I managed to get it to work with a CSV from ASN bank as well.

The CsvConfig dataclass explains what is required for a CSV configuration. The ASN export directly was a special case, since it doesn't come with a header row. Therefore, you can add column_names. The rest of it is pretty straightforward: for any column we need to know, you give the name and sometimes some extra info like delimiters or a format.

Still needs some work on the user interaction (you have to specify the format every time) and needs to be verified with more CSV formats. And probably some typos here and there.

jelleklaver avatar Feb 17 '22 20:02 jelleklaver