This commit is contained in:
starnakin 2023-11-21 16:08:23 +01:00
parent fd19180e1d
commit 646e1efea2
7 changed files with 33 additions and 2 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.env
*.cpython-311.pyc

View File

@ -1,2 +0,0 @@
# TRANSCENDENCE
The last project of the 42 common core

12
command.py Normal file
View 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
View File

@ -0,0 +1 @@
from

9
login.py Normal file
View 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
View 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
View File

@ -0,0 +1 @@
tinydb==4.8.0