hebdobot/settings.py

35 lines
1.1 KiB
Python
Raw Normal View History

2024-01-11 08:17:25 +01:00
import logging
import os
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
VERSION = "3.0.0"
# Log File
LOGFILE = os.environ.get("LOGFILE", os.path.join(BASE_DIR, "hebdobot.log"))
LOGLEVEL = os.environ.get("LOGLEVEL", logging.DEBUG)
LOGFORMAT = os.environ.get("LOGFORMAT", "%(asctime)s.%(msecs)03d - %(message)s")
LOGDATE = os.environ.get("LOGDATE", "%Y-%m-%d %H:%M:%S")
# IRC configuration
IRC_SERVER = os.environ.get("IRC_SERVER", "irc.libera.chat")
IRC_PORT = int(os.environ.get("IRC_PORT", 6667))
IRC_CHANNEL = os.environ.get("IRC_CHANNEL", " #bidibot")
IRC_NICK = os.environ.get("IRC_NICK", " Testbot")
IRC_PASSWORD = os.environ.get("IRC_PASSWORD", " ")
IRC_DELAY = float(os.environ.get("IRC_DELAY", 0.5)) # Délai entre plusieurs messages
# User Alias
USER_ALIASES = ""
# Review
REVIEW_DIRECTORY = os.environ.get("REVIEW_DIRECTORY", os.path.join(BASE_DIR, "reviews"))
REVIEW_PASTEBIN = ""
REVIEW_STATS = os.environ.get("REVIEW_STATS", os.path.join(REVIEW_DIRECTORY, "reviewstats.csv"))
# Mastodon
MASTODON_SERVER = ""
MASTODON_NAME = ""
MASTODON_PASSWORD = ""