From 646e1efea28500695bfe1ffa0369968d2c753515 Mon Sep 17 00:00:00 2001 From: starnakin Date: Tue, 21 Nov 2023 16:08:23 +0100 Subject: [PATCH] init --- .gitignore | 2 ++ README.md | 2 -- command.py | 12 ++++++++++++ database.py | 1 + login.py | 9 +++++++++ main.py | 8 ++++++++ requirements.txt | 1 + 7 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 .gitignore delete mode 100644 README.md create mode 100644 command.py create mode 100644 database.py create mode 100644 login.py create mode 100644 main.py create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..311f13e --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.env +*.cpython-311.pyc \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index cb73d00..0000000 --- a/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# TRANSCENDENCE -The last project of the 42 common core \ No newline at end of file diff --git a/command.py b/command.py new file mode 100644 index 0000000..c6588e9 --- /dev/null +++ b/command.py @@ -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 \ No newline at end of file diff --git a/database.py b/database.py new file mode 100644 index 0000000..f90c39e --- /dev/null +++ b/database.py @@ -0,0 +1 @@ +from \ No newline at end of file diff --git a/login.py b/login.py new file mode 100644 index 0000000..32d264c --- /dev/null +++ b/login.py @@ -0,0 +1,9 @@ +from command import AbstractCommand + +class Login(AbstractCommand): + + def check_arg(self): + return len(self.arg) < 2 + + def execute(self) -> str: + \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 0000000..f4abf3e --- /dev/null +++ b/main.py @@ -0,0 +1,8 @@ +import sys +from command import commands + +import login + +args = sys.argv[1:] + +print(commands[0].__name__) \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..31a68e7 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +tinydb==4.8.0