Initial import: schedule-web (Flask, triron.ru)

This commit is contained in:
Triton 2026-09-28 05:53:16 +00:00
commit 8ccbc0e9e0
6 changed files with 3047 additions and 0 deletions

8
.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
venv/
__pycache__/
*.pyc
*.log
.journal_credentials
session.json
session_test.json
schedule.json

1573
PythonApplication1.py Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

29
README.md Normal file
View File

@ -0,0 +1,29 @@
# schedule-web
Flask-сервис, который тянет расписание и ведёт журнал. Отдаётся через nginx
на домен `triron.ru` (проксирование на `127.0.0.1:5000`).
## Состав
- `PythonApplication1.py` — основной код приложения
- `auto-refresh.sh` — периодический POST на `/api/update`
- `requirements.txt` — зависимости из production-окружения
- `PythonApplication1.py.bak_timeago` — бэкап кода от 13.09
## Запуск
```
python3 -m venv venv
./venv/bin/pip install -r requirements.txt
./venv/bin/playwright install chromium
./venv/bin/python PythonApplication1.py
```
Приложение ожидает `127.0.0.1:5000` и файл с учётными данными
`.journal_credentials` (права 600) в корне проекта — две строки: логин, пароль.
Файл в репозиторий намеренно не включён.
## Что не коммитится
`venv/`, логи, `session*.json`, `schedule.json` и `.journal_credentials` —
см. `.gitignore`.

2
auto-refresh.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
curl -s -X POST http://127.0.0.1:5000/api/update > /dev/null 2>&1

11
requirements.txt Normal file
View File

@ -0,0 +1,11 @@
blinker==1.9.0
click==8.5.0
Flask==3.1.3
greenlet==3.5.5
itsdangerous==2.2.0
Jinja2==3.1.6
MarkupSafe==3.0.3
playwright==1.62.0
pyee==13.0.1
typing_extensions==4.16.0
Werkzeug==3.1.8