aboutsummaryrefslogtreecommitdiff
path: root/ledger.py
diff options
context:
space:
mode:
authorAdrián Oliva <adrian.oliva@cimat.mx>2023-05-08 21:31:09 -0600
committerAdrián Oliva <adrian.oliva@cimat.mx>2023-05-08 21:31:09 -0600
commitca65b3836eaa5b026b3f13afdd7ad3b8b192e9a4 (patch)
tree86e55759380d38c92b47f124bd051c3ecfccd089 /ledger.py
parent269eee248d24acbb12f13ab519dfbe1c881d3bb8 (diff)
downloadLedger.py-ca65b3836eaa5b026b3f13afdd7ad3b8b192e9a4.tar.gz
Ledger.py-ca65b3836eaa5b026b3f13afdd7ad3b8b192e9a4.zip
First attempt at sorting accounts.
I DID IT!! I'm really happy with the result. :')
Diffstat (limited to '')
-rwxr-xr-xledger.py4
1 files changed, 4 insertions, 0 deletions
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)