A private Telegram bot for journaling (text/photos), quick summaries, and a “chat” mode. Stores data locally in SQLite.
- Diary: text entries and photo entries (photos are saved to disk).
- Summaries: daily / weekly / monthly.
- Tags:
#tagsinside entry text. - Privacy: allowlist by Telegram
user_id(or open access if the list is empty). - Web search (optional): enable/disable via
WEB_SEARCH_ENABLED. - UI language: Russian/English via
BOT_LANG.
- Python 3.10+ (recommended 3.11+)
- Telegram Bot API token
- OpenAI API key
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
# fill in .env
python3 bot.pyThe bot reads settings from environment variables and an optional .env file (do not commit secrets).
Required:
TELEGRAM_TOKEN— Telegram bot tokenOPENAI_API_KEY— OpenAI API keyALLOWED_USER_IDS— Telegramuser_idallowlist (comma/space-separated, e.g.123,456). Empty => open access.
Optional:
BOT_LANG—ruoren(default:ru)OPENAI_MODEL— default model (example:gpt-5.2)OPENAI_VISION_MODEL— model for photo understanding (default:OPENAI_MODEL)OPENAI_WEB_SEARCH_MODEL— model for web search (default:OPENAI_MODEL)WEB_SEARCH_ENABLED—1/0BOT_DB_PATH— SQLite path (default:diary.db)PHOTO_DIR— photo directory (default:diary_photos)DIARY_PAGE_SIZE— diary list page sizeLOG_LEVEL—INFO,DEBUG, ...
To find your Telegram user_id, message @userinfobot (or similar).
- Database:
BOT_DB_PATH(defaultdiary.db) - Photos:
PHOTO_DIR(defaultdiary_photos/)
Set up regular backups for these files/folders.
All user-facing strings are centralized in texts.py. Switch UI language via BOT_LANG.
ETH: 0x5F911FA3045dfE3d8E7c23a916FE8f2Aa45f8bd7
Ideas and next steps live in ROADMAP.md.