Compare commits

..

2 Commits

Author SHA1 Message Date
Kevin B
bc5796d989 Share local folder with container 2025-10-06 14:21:30 +00:00
Kevin Bataille
c073006592 fix: Display ascii art on startup 2025-10-06 16:16:32 +02:00
2 changed files with 12 additions and 9 deletions

View File

@@ -18,5 +18,5 @@ services:
- TELEGRAM_TOKEN=${TELEGRAM_TOKEN}
- TELEGRAM_CHAT_ID=${TELEGRAM_CHAT_ID}
volumes:
- ./log:/app/log
- ./:/app
restart: unless-stopped

19
main.py
View File

@@ -18,14 +18,6 @@ def main():
"""
Main function to initialize the Booker and start the booking process.
"""
# Display ASCII art and username
with open('ascii.md', 'r') as f:
ascii_art = f.read()
print(ascii_art)
username = os.environ.get("CROSSFIT_USERNAME")
print(f"Username: {username}")
print()
# Set up logging
logging.basicConfig(
level=logging.INFO,
@@ -35,6 +27,17 @@ def main():
]
)
# Display ASCII art and username
try:
with open('ascii.md', 'r') as f:
ascii_art = f.read()
print(ascii_art, flush=True)
username = os.environ.get("CROSSFIT_USERNAME")
print(f"Username: {username}", flush=True)
print(flush=True)
except Exception as e:
logging.error(f"Error displaying ASCII: {e}")
# Initialize components
auth_handler = AuthHandler(
str(os.environ.get("CROSSFIT_USERNAME")),