aboutsummaryrefslogtreecommitdiff
path: root/ledger.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xledger.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ledger.py b/ledger.py
index d9eb14f..0e1e166 100755
--- a/ledger.py
+++ b/ledger.py
@@ -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)