def parse_args():
parser = argparse.ArgumentParser(
- description="Terminal flashcards from Markdown")
- parser.add_argument("inp",
- metavar="input file",
- type=str,
- nargs=1)
- parser.add_argument("-a", "--alphabetize",
- action='store_true',
- help="alphabetize card order")
- parser.add_argument("-f", "--flip",
- action='store_true',
- help="show second column first")
- parser.add_argument("-p", "--purge",
- action='store_true',
- help="don't check cached info before starting")
+ description="Terminal flashcards from Markdown"
+ )
+ parser.add_argument("inp", metavar="input file", type=str, nargs=1)
+ parser.add_argument(
+ "-a",
+ "--alphabetize",
+ action="store_true",
+ help="alphabetize card order",
+ )
+ parser.add_argument(
+ "-f", "--flip", action="store_true", help="show second column first"
+ )
+ parser.add_argument(
+ "-p",
+ "--purge",
+ action="store_true",
+ help="don't check cached info before starting",
+ )
# TODO: don't require input file when using -P
- parser.add_argument("-P", "--purge-all",
- action='store_true',
- help="don't check cached info before starting")
- parser.add_argument("-r", "--reverse",
- action='store_true',
- help="reverse card order")
- parser.add_argument("-s", "--shuffle",
- action='store_true',
- help="shuffle card order")
- parser.add_argument("-v", "--version",
- action='version',
- version="lightcards 0.6.0")
+ parser.add_argument(
+ "-P",
+ "--purge-all",
+ action="store_true",
+ help="don't check cached info before starting",
+ )
+ parser.add_argument(
+ "-r", "--reverse", action="store_true", help="reverse card order"
+ )
+ parser.add_argument(
+ "-s", "--shuffle", action="store_true", help="shuffle card order"
+ )
+ parser.add_argument(
+ "-v", "--version", action="version", version="lightcards 0.6.0"
+ )
return parser.parse_args()
def get_orig():
"""Return original header and stack"""
- return((headers, stack))
+ return (headers, stack)
def main(args=sys.argv):