From 7d7ced9b81b27abbcdc6c781990bc5bea69a6d52 Mon Sep 17 00:00:00 2001 From: Benjamin Loison Date: Thu, 3 Oct 2024 21:36:43 +0200 Subject: [PATCH] WIP sort all transactions --- bnp_pdf_statement_parser.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bnp_pdf_statement_parser.py b/bnp_pdf_statement_parser.py index ff30069..b7da3fc 100755 --- a/bnp_pdf_statement_parser.py +++ b/bnp_pdf_statement_parser.py @@ -60,6 +60,9 @@ for folder in sorted(os.listdir()): from pprint import pprint #pprint(transactions) +import operator +allTransactions.sort(key = operator.itemgetter('date')) +print(len(allTransactions)) pprint(allTransactions) exit(0)