Files
batch-bot/GIT_INSTRUCTIONS.md
bilal a18ad30961 Initial commit: Batch Bot - Telegram Comment Bot
0.0.1
Features:
- Multi-account support via session files
- AI comments generation via Ollama (local LLM)
- Telegram bot for moderation (approve/reject/regenerate)
- Docker support (controller + worker)
- Auto-join public groups
- Comment regeneration on group re-add
- Statistics tracking

Tech stack:
- Python 3.11
- Telethon 1.34 (Telegram user client)
- Aiogram 3.4 (Telegram bot framework)
- SQLite (Database)
- Docker & Docker Compose
- Ollama (Local LLM)
2026-02-24 04:40:07 +03:00

3.5 KiB
Raw Blame History

Инструкция по отправке в Gitea

1. Инициализация Git

cd /Users/bilal/Documents/code/batch-bot

# Инициализация репозитория
git init

# Проверка статуса
git status

2. Добавление файлов

# Добавить все файлы
git add .

# Или выборочно:
git add README.md
git add bot/
git add docker-compose.yml
git add Dockerfile
git add requirements.txt
git add auth.py
git add prompt.txt
git add .env.example
git add .gitignore
git add DOCKER.md
git add QUICKSTART.md

# Проверка что будет закоммичено
git status

3. Первый коммит

git commit -m "Initial commit: Batch Bot - Telegram Comment Bot

Features:
- Multi-account support
- AI comments via Ollama
- Moderation via Telegram bot
- Docker support
- Auto-join groups
- Comment regeneration

Tech stack:
- Python 3.11
- Telethon (Telegram client)
- Aiogram (Bot framework)
- SQLite (Database)
- Docker & Docker Compose"

4. Добавление удалённого репозитория

# Добавить remote
git remote add origin https://git.core.com.ru/bilal/batch-bot.git

# Или по SSH:
git remote add origin ssh://git@git.core.com.ru/bilal/batch-bot.git

# Проверка
git remote -v

5. Отправка в Gitea

# Отправка main ветки
git push -u origin main

# Если ветка называется master:
git branch -M main
git push -u origin main

6. Последующие изменения

# Внесение изменений
# ... редактирование файлов ...

# Добавление изменений
git add .

# Коммит
git commit -m "Описание изменений"

# Отправка
git push

📋 Что НЕ попадает в репозиторий:

  • .env — содержит секреты
  • sessions/*.session — файлы сессий
  • data/comments.db — база данных
  • logs/ — логи
  • __pycache__/ — кэш Python
  • .DS_Store — системные файлы

🔐 Проверка перед отправкой

# Проверить что не попадает в репозиторий
git status

# Проверить .gitignore
git check-ignore -v .env
git check-ignore -v sessions/
git check-ignore -v data/

📊 Структура в Gitea

После отправки в репозитории будет:

batch-bot/
├── README.md              # Документация
├── DOCKER.md              # Docker инструкция
├── QUICKSTART.md          # Быстрый старт
├── .env.example           # Пример конфигурации
├── .gitignore
├── docker-compose.yml
├── Dockerfile
├── requirements.txt
├── auth.py
├── prompt.txt
└── bot/
    ├── config.py
    ├── controller.py
    ├── worker.py
    ├── db.py
    ├── keyboard.py
    ├── ollama.py
    ├── session_manager.py
    └── __init__.py

🚀 Развёртывание из Gitea

На сервере:

# Клонирование
git clone https://git.core.com.ru/bilal/batch-bot.git
cd batch-bot

# Настройка
cp .env.example .env
nano .env

# Создание сессий
pip install -r requirements.txt
python auth.py

# Запуск
docker-compose build
docker-compose up -d