diff --git a/.gitignore b/.gitignore index 4f3eb8b..e0c6301 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,6 @@ logo/ app.json Procfile .vscode/ -.gitignore \ No newline at end of file +.gitignore +poetry.lock +pyproject.toml \ No newline at end of file diff --git a/.replit b/.replit new file mode 100644 index 0000000..be5c413 --- /dev/null +++ b/.replit @@ -0,0 +1,2 @@ +language = "python3" +run = "python run-repl.py" \ No newline at end of file diff --git a/app/templates/footer.html b/app/templates/footer.html index 2ddabd5..deff574 100644 --- a/app/templates/footer.html +++ b/app/templates/footer.html @@ -4,7 +4,33 @@ @odysseusmax + + \ No newline at end of file diff --git a/app/templates/header.html b/app/templates/header.html index ead6e53..fd8e5a9 100644 --- a/app/templates/header.html +++ b/app/templates/header.html @@ -1,44 +1,48 @@ - + - + - - + + + + - + - - - {% if title %} {{title}} {% else %} Telegram Index {% endif %} - + + {% if title %} {{title}} {% else %} Telegram Index {% endif %} + - + -
-
- Telegram index - {% if authenticated %} Logout {% else %} {% - endif %} -
+
+
+ Telegram index + {% if authenticated %} Logout {% else %} {% endif %} +
-
-
\ No newline at end of file +
+
\ No newline at end of file diff --git a/app/templates/home.html b/app/templates/home.html index 214831c..38b929f 100644 --- a/app/templates/home.html +++ b/app/templates/home.html @@ -10,7 +10,7 @@ - +
{{chat.name}}
diff --git a/app/templates/login.html b/app/templates/login.html index 685d576..74a081f 100644 --- a/app/templates/login.html +++ b/app/templates/login.html @@ -3,7 +3,7 @@
-

+

Sign in to view the contents

diff --git a/run-repl.py b/run-repl.py new file mode 100644 index 0000000..a44866c --- /dev/null +++ b/run-repl.py @@ -0,0 +1,33 @@ +import os +# from dotenv import load_dotenv + +# load_dotenv() # take environment variables from .env. + +# Code of your application, which uses environment variables (e.g. from `os.environ` or +# `os.getenv`) as if they came from the actual environment. + +os.system("alias python3=python") + + +def runSetup(): + def alert(missing="API_ID , API_HASH"): + print( + f"\nCopy your {missing} and save it into Secrets(Environment variables) Sidebar!\n" + ) + + api_id = os.getenv("API_ID") + if api_id is None: + alert() + return + + session_string = os.getenv("SESSION_STRING") + if session_string is None: + os.system("python app/generate_session_string.py") + alert(missing="SESSION_STRING") + return + + os.system("python -m app") + + +if __name__ == "__main__": + runSetup()