init
This commit is contained in:
parent
fd19180e1d
commit
646e1efea2
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
.env
|
||||
*.cpython-311.pyc
|
12
command.py
Normal file
12
command.py
Normal file
@ -0,0 +1,12 @@
|
||||
class AbstractCommand():
|
||||
|
||||
def __init__(self, name: str, arg: [str], help_text: str):
|
||||
self.name = name;
|
||||
self.arg = arg;
|
||||
self.help_text = help_text;
|
||||
|
||||
def execute(self):
|
||||
pass
|
||||
|
||||
def check_arg(self):
|
||||
pass
|
1
database.py
Normal file
1
database.py
Normal file
@ -0,0 +1 @@
|
||||
from
|
9
login.py
Normal file
9
login.py
Normal file
@ -0,0 +1,9 @@
|
||||
from command import AbstractCommand
|
||||
|
||||
class Login(AbstractCommand):
|
||||
|
||||
def check_arg(self):
|
||||
return len(self.arg) < 2
|
||||
|
||||
def execute(self) -> str:
|
||||
|
8
main.py
Normal file
8
main.py
Normal file
@ -0,0 +1,8 @@
|
||||
import sys
|
||||
from command import commands
|
||||
|
||||
import login
|
||||
|
||||
args = sys.argv[1:]
|
||||
|
||||
print(commands[0].__name__)
|
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@ -0,0 +1 @@
|
||||
tinydb==4.8.0
|
Loading…
Reference in New Issue
Block a user