diff options
author | Adrián Oliva <adrian.oliva@cimat.mx> | 2023-05-05 17:39:45 -0600 |
---|---|---|
committer | Adrián Oliva <adrian.oliva@cimat.mx> | 2023-05-05 17:39:45 -0600 |
commit | c86923017756909d1e7ab2ad3f0d2573f2d547d3 (patch) | |
tree | d1c5bc08c190ad68f670a1cb6de77bbc01f99556 /ledger.py | |
parent | 3fad0986c04c6442c2d506387a72e221305902f9 (diff) | |
download | Ledger.py-c86923017756909d1e7ab2ad3f0d2573f2d547d3.tar.gz Ledger.py-c86923017756909d1e7ab2ad3f0d2573f2d547d3.zip |
First attempt at the register command.
Still needs colored output and doesn't have any filters to it.
Diffstat (limited to 'ledger.py')
-rwxr-xr-x | ledger.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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() |