]> git.armaanb.net Git - lightcards.git/blobdiff - lightcards/runner.py
Remove ability to go left to quit the menu
[lightcards.git] / lightcards / runner.py
index 83a71b009b25413e51f112f2e200251b4b705a76..f9f1abd9437d5f430bd7e6da721fc0562beb2b76 100644 (file)
@@ -4,6 +4,7 @@
 import argparse
 from curses import wrapper
 import os
+import pkg_resources
 from random import shuffle
 import sys
 
@@ -40,7 +41,10 @@ def parse_args():
         "-s", "--shuffle", action="store_true", help="shuffle card order"
     )
     parser.add_argument(
-        "-v", "--version", action="version", version="lightcards 0.6.0"
+        "-v",
+        "--version",
+        action="version",
+        version=f"lightcards {pkg_resources.require('lightcards')[0].version}",
     )
     return parser.parse_args()
 
@@ -56,7 +60,7 @@ def show(args, stack, headers):
 
     # Check for caches
     idx = Status()
-    cache = progress.dive(get_orig())
+    cache = progress.dive(get_orig()[1])
     if cache:
         (stack) = cache
 
@@ -64,7 +68,7 @@ def show(args, stack, headers):
     if args.shuffle:
         shuffle(stack)
     if args.alphabetize:
-        stack.sort()
+        stack.sort(key=lambda x: x.front)
     if args.reverse:
         stack.reverse()
     if args.flip: