Gestion des logs IRC de l'AFPy
  • Python 52.1%
  • HTML 26.3%
  • JavaScript 12.1%
  • CSS 9.5%
Find a file
2025-11-12 09:43:46 +01:00
static Try to survive in the strict CSP area. 2025-11-12 09:43:46 +01:00
.gitignore fix: Application can use a specific config file based on environment variable 2021-01-27 12:17:49 +01:00
app.py Try to survive in the strict CSP area. 2025-11-12 09:43:46 +01:00
config.py Try to survive in the strict CSP area. 2025-11-12 09:43:46 +01:00
README.md Try to survive in the strict CSP area. 2025-11-12 09:43:46 +01:00
requirements.txt Missing requirement 2021-05-01 17:09:42 +02:00
template.html Try to survive in the strict CSP area. 2025-11-12 09:43:46 +01:00

AfpyLogs

Web view of IRC logs from #afpy channel on libera.chat.

Installing

pip install -r requirements.txt

Configuring

Create a config file, either config_development.py or config_production.py containing something like:

SECRET_KEY = "Choose a secret key"

JINJA_ENV = {
    "TRIM_BLOCKS": True,
    "LSTRIP_BLOCKS": True,
}

LOG_PATH = "/home/mdk/clones/afpy/afpylogs/logs/"

# IRSSI log pattern
DATE_FORMAT = "(\d+-\d+-\d+ )?(?P<time>\d\d:\d\d)"
LOG_PATTERN = r"^%s\s+[<*]\s*(?P<nick>[^> ]+)[> ]\s+(?P<message>.*)$" % DATE_FORMAT

BOLD_PATTERN = r"\*[^*\s]+\*"
BOLD_HTML = "<b>{text}</b>"

You'll need sone logs in the logs/ directory.

Running

gunicorn --workers 2 --bind 0.0.0.0:8000 app