App for automatic repost photos from vk group to telegram channel.
- Clone repository
- Get token for telegram bot from @BotFather.
- Create standalone VK app, get its id and service token
- Get your vk group id
- Type
pipenv install
- Copy .env.conf file to .env and fill it with your data.
- Init db:
python initdb.py
- Type
chmod +x ./run.py
- Add script to cronab
BOT_API_TOKEN
- token from @BotFatherTG_CHAT_ID
- telegram group name, should start from @VK_APP_ID
- vk app idVK_SERVICE_TOKEN
- vk service app tokenVK_PAGE_ID
- vk group id for tracking, should start from -POSTS_COUNT
- count of posts will fetched from vk by every iterationDB_PATH
- path to sqlite dbSETTINGS_MODULE
- prod or devPROJECT_PATH
- path to root of project
Params for base init
TG_CHANNEL_NAME
TG_CHANNEL_URL
VK_PUBLIC_NAME
VK_PUBLIC_URL
Install dev dependencies: pipenv install --dev
Then run checks:
- black:
pipenv run black . --config pyproject.toml
- flake8
pipenv run flake8 . --toml-config pyproject.toml