From 3c884626432e00720894132ec86e378f1b92d6ef Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Tue, 9 Feb 2021 11:25:34 -0500 Subject: [PATCH] Restructure files --- lightcards/__init__.py | 3 --- lightcards/__main__.py | 4 ++++ lightcards/display.py | 10 +++++----- lightcards/{lightcards.py => runner.py} | 0 4 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 lightcards/__main__.py rename lightcards/{lightcards.py => runner.py} (100%) diff --git a/lightcards/__init__.py b/lightcards/__init__.py index b460a51..e69de29 100644 --- a/lightcards/__init__.py +++ b/lightcards/__init__.py @@ -1,3 +0,0 @@ -from . import lightcards - -lightcards.main() diff --git a/lightcards/__main__.py b/lightcards/__main__.py new file mode 100644 index 0000000..82a361e --- /dev/null +++ b/lightcards/__main__.py @@ -0,0 +1,4 @@ +import sys +from lightcards.runner import main + +sys.exit(main()) diff --git a/lightcards/display.py b/lightcards/display.py index 35cd149..2a25354 100644 --- a/lightcards/display.py +++ b/lightcards/display.py @@ -7,7 +7,7 @@ from random import shuffle import sys import textwrap -from . import lightcards, progress +from . import runner, progress class Display: @@ -47,7 +47,7 @@ class Display: if self.obj.getIdx() + 1 == len(self.stack): self.obj.setIdx(0) - progress.dump(self.stack, lightcards.get_orig()) + progress.dump(self.stack, runner.get_orig()) sys.exit(0) def ntotal(self): @@ -125,7 +125,7 @@ class Display: self.obj.setIdx(0) self.get_key() elif key == "y": - self.stack = lightcards.get_orig()[1] + self.stack = runner.get_orig()[1] self.menu_print("Stack reset!") elif key == "a": self.stack.sort() @@ -291,7 +291,7 @@ class Display: ) self.help_win.hline(2, 1, curses.ACS_HLINE, 15) text = [ - "Welcome to lightcards. Here are some keybindings", + "Welcome to runner. Here are some keybindings", "to get you started:", "", "h, left previous card", @@ -370,7 +370,7 @@ class Display: elif key == "m": self.disp_menu() elif key == "e": - (self.headers, self.stack) = lightcards.reparse() + (self.headers, self.stack) = runner.reparse() self.get_key() def disp_sidebar(self): diff --git a/lightcards/lightcards.py b/lightcards/runner.py similarity index 100% rename from lightcards/lightcards.py rename to lightcards/runner.py -- 2.39.2