From: Armaan Bhojwani Date: Sun, 31 Jan 2021 03:21:37 +0000 (-0500) Subject: Update installation X-Git-Tag: v0.1.0~7 X-Git-Url: https://git.armaanb.net/?p=lightcards.git;a=commitdiff_plain;h=589f6fda8e54d5b5ed0ae3b1c25aa7357974ddd3 Update installation Add Makefile shell script, and __main__.py --- diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b0b7362 --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ +.DEFAULT_GOAL := install + +install: + pip install . + cp ./lightcards.sh /usr/local/bin/lightcards diff --git a/README.md b/README.md index 560b692..88c6d73 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Lightcards is a terminal program for using flashcards from a Markdown or HTML table. Currently under development. # Installation -`pip install .` +`make` ## License Copyright Armaan Bhojwani 2021, MIT license diff --git a/lightcards.sh b/lightcards.sh new file mode 100755 index 0000000..10a1657 --- /dev/null +++ b/lightcards.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +python3 -m lightcards ${@} diff --git a/lightcards/__main__.py b/lightcards/__main__.py new file mode 100644 index 0000000..283493d --- /dev/null +++ b/lightcards/__main__.py @@ -0,0 +1,4 @@ +import sys +import lightcards.lightcards + +lightcards.lightcards.main(sys.argv) diff --git a/lightcards/lightcards.py b/lightcards/lightcards.py index 775b13d..62019a5 100755 --- a/lightcards/lightcards.py +++ b/lightcards/lightcards.py @@ -4,6 +4,7 @@ import argparse from curses import wrapper +import sys from . import display, parse from .deck import Status @@ -26,7 +27,7 @@ def show(stack, headers): wrapper(display.get_key, stack, headers, idx) -def main(): +def main(args=sys.argv): args = parse_args() if args.version: print("0.0.0")