From ca65b3836eaa5b026b3f13afdd7ad3b8b192e9a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Oliva?= Date: Mon, 8 May 2023 21:31:09 -0600 Subject: First attempt at sorting accounts. I DID IT!! I'm really happy with the result. :') --- ledger.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ledger.py') diff --git a/ledger.py b/ledger.py index d5e9b72..e98abc1 100755 --- a/ledger.py +++ b/ledger.py @@ -4,6 +4,7 @@ from utils.read_file import read_ledger from utils.register import print_register from utils.sort import sort_entries from utils.balance import print_balance +from utils.acc_regex import filter_accounts def main(): args = get_arguments() @@ -14,6 +15,9 @@ def main(): for file in args.files: result += read_ledger(file) + if len(args.verb) > 1: + result = filter_accounts(args.verb[1:], result) + if args.sort: sort_entries(result, args.sort) -- cgit v1.2.3