From c86923017756909d1e7ab2ad3f0d2573f2d547d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Oliva?= Date: Fri, 5 May 2023 17:39:45 -0600 Subject: First attempt at the register command. Still needs colored output and doesn't have any filters to it. --- ledger.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ledger.py') diff --git a/ledger.py b/ledger.py index a224591..d9eb14f 100755 --- a/ledger.py +++ b/ledger.py @@ -1,19 +1,24 @@ #!/usr/bin/env python3 from utils.args import get_arguments, test_args from utils.read_file import read_ledger +from utils.register import print_register def main(): args = get_arguments() test_args(args) if args.files: + result = [] for file in args.files: - result = read_ledger(file) + result += read_ledger(file) if args.verb == 'print': for ent in result: print(ent) + elif args.verb in ['register', 'reg', 'r']: + print_register(result) + if __name__ == '__main__': main() -- cgit v1.2.3