Gestion des logs IRC de l'AFPy
- Python 52.1%
- HTML 26.3%
- JavaScript 12.1%
- CSS 9.5%
| static | ||
| .gitignore | ||
| app.py | ||
| config.py | ||
| README.md | ||
| requirements.txt | ||
| template.html | ||
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