2024-01-11 08:17:25 +01:00
|
|
|
import logging
|
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
|
|
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
|
|
|
|
|
|
|
|
# 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))
|
2024-04-06 10:03:48 +02:00
|
|
|
IRC_CHANNEL = os.environ.get("IRC_CHANNEL", " #april-test")
|
2024-04-01 19:27:52 +02:00
|
|
|
IRC_NICK = os.environ.get("IRC_NICK", "Testbot")
|
2024-01-11 08:17:25 +01:00
|
|
|
IRC_PASSWORD = os.environ.get("IRC_PASSWORD", " ")
|
|
|
|
IRC_DELAY = float(os.environ.get("IRC_DELAY", 0.5)) # Délai entre plusieurs messages
|
|
|
|
|
2024-04-01 19:27:52 +02:00
|
|
|
# User aliases
|
|
|
|
USER_ALIASES = os.environ.get("USER_ALIASES", os.path.join(BASE_DIR, "users.conf"))
|
2024-01-11 08:17:25 +01:00
|
|
|
|
|
|
|
# Review
|
2024-04-01 19:27:52 +02:00
|
|
|
REVIEW_HOUR = (16, 30)
|
2024-01-11 08:17:25 +01:00
|
|
|
REVIEW_DIRECTORY = os.environ.get("REVIEW_DIRECTORY", os.path.join(BASE_DIR, "reviews"))
|
|
|
|
REVIEW_STATS = os.environ.get("REVIEW_STATS", os.path.join(REVIEW_DIRECTORY, "reviewstats.csv"))
|
|
|
|
|
2024-04-01 19:27:52 +02:00
|
|
|
# Pastebin
|
|
|
|
PASTEBIN_URL = "https://paste.chapril.org/"
|
|
|
|
# Values : 5min, 10min, 1hour, 1day, 1week, 1month, 1year, never
|
2024-04-06 10:03:48 +02:00
|
|
|
PASTEBIN_EXPIRATION = "1week"
|
2024-04-01 19:27:52 +02:00
|
|
|
|
|
|
|
# Cron
|
|
|
|
CRON_REVIEW_REMINDERS = [(11, 45)]
|
|
|
|
CRON_STOP_BOT = [(16, 15)]
|
|
|
|
|
2024-01-11 08:17:25 +01:00
|
|
|
# Mastodon
|
|
|
|
MASTODON_SERVER = ""
|
|
|
|
MASTODON_NAME = ""
|
|
|
|
MASTODON_PASSWORD = ""
|