diff options
author | Adrián Oliva <adrian.oliva@cimat.mx> | 2023-05-07 00:17:58 -0600 |
---|---|---|
committer | Adrián Oliva <adrian.oliva@cimat.mx> | 2023-05-07 00:17:58 -0600 |
commit | 03304074913aaf5cfc05de8ffc00f66823896e50 (patch) | |
tree | f89174ca7e4f3352315857c3e2f6962cc48e1fec /ledger.py | |
parent | 4875c36a055ea89118e665bdd8b3d0148b112307 (diff) | |
download | Ledger.py-03304074913aaf5cfc05de8ffc00f66823896e50.tar.gz Ledger.py-03304074913aaf5cfc05de8ffc00f66823896e50.zip |
First attempt at sorting.
We can only sort by date and amount right now. I don't know if there are
other important ways of sorting. D:
Diffstat (limited to 'ledger.py')
-rwxr-xr-x | ledger.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -2,6 +2,7 @@ from utils.args import get_arguments, test_args from utils.read_file import read_ledger from utils.register import print_register +from utils.sort import sort_entries def main(): args = get_arguments() @@ -12,6 +13,9 @@ def main(): for file in args.files: result += read_ledger(file) + if args.sort: + sort_entries(result, args.sort) + if args.verb == 'print': for ent in result: print(ent) |