From 116467ae435a2ab9afd17c28f583fdf512a361bb Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Thu, 10 Nov 2022 19:34:47 +0100 Subject: [PATCH] add CE detailed label as metadata --- beancount_cde_importer/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/beancount_cde_importer/__init__.py b/beancount_cde_importer/__init__.py index 9738226..7267a13 100644 --- a/beancount_cde_importer/__init__.py +++ b/beancount_cde_importer/__init__.py @@ -13,6 +13,7 @@ from beancount.ingest import cache, importer # type: ignore COL_DATE = "Date de comptabilisation" COL_LABEL = "Libelle simplifie" +COL_DETAILED_LABEL = "Libelle operation" COL_DEBIT = "Debit" COL_CREDIT = "Credit" COL_DETAIL = "Informations complementaires" @@ -80,6 +81,7 @@ class CDEImporter(importer.ImporterProtocol): category: str = row[COL_CATEGORY] subcategory: str = row[COL_SUBCATEGORY] label: str = row[COL_LABEL] + detailed_label: str = row[COL_DETAILED_LABEL] debit: str = row[COL_DEBIT] credit: str = row[COL_CREDIT] detail: str = row[COL_DETAIL] if row[COL_DETAIL] else "" @@ -114,6 +116,7 @@ class CDEImporter(importer.ImporterProtocol): meta["op_date"] = op_date meta["ce_category"] = f"{category} - {subcategory}" + meta["detailed_label"] = detailed_label directives.append( data.Transaction(