Skip to content

An application that forwards wall posts and playlists from VK community to Telegram channel.

License

Notifications You must be signed in to change notification settings

Bizordec/vk-to-tgm

Repository files navigation

vk-to-tgm

An application that forwards wall posts and playlists from VK community to Telegram channel.

Consists of following services:

  • Server that receives VK Callback events
  • Telegram bot that forwards wall posts or playlists by user request
  • Celery worker that forwards wall posts
  • (optional) Celery worker that forwards playlists
  • Celery Beat service, that cleans up a SQLite3 database task results

vtt_schema

Requirements:

What can it forward

VK Telegram Notes
Text Will be splitted into multpile messages if VK text is too big.
Photo Will be posted with the largest size available.
Video VK videos will be uploaded directly (up to 720p). External videos (YouTube, Vimeo, etc.) will be at the top in the form of links, so that the first one will be shown in the preview.
Audio Will be posted in separate message.
File Will be posted in separate message.
Poll Will be posted in separate message.
Market Will be in the form of link.
Playlist Additional Telegram channel is required. There will be separate message in the main channel with the link to the message in the playlist channel, where audios will be uploaded.
Link Will be shown just as VK link.
Article Will be in the form of link.
Poster Works the same way as with the photo.
Graffiti Works the same way as with the photo.
Map Will be posted in separate message.
Live stream Will be posted at the top in the form of link.

NOTE: if post was edited in VK, it will NOT be edited in Telegram. As a workaround, you can delete old Telegram messages and reforward edited post through Telegram bot.

Example

vtt_example

Working example: https://t.me/mashup_vk

Installation

Run install.sh script.

Docker installation

  1. Set environment variables manually in .env file or by running
./vtt-cli.sh set_env
  1. Install Nginx and run command
./vtt-cli.sh setup_nginx
  1. Sign in VK and Telegram
docker compose run --rm -it sign_in
  1. Start the app
docker compose up

# Or, if you also want to handle playlists
docker compose --profile with_pl up

If you want to install client SSL certificate, read here.

Uninstallation

Run uninstall.sh script.

Docker uninstallation

docker compose down -v --rmi all --remove-orphans

Logs

You can check logs in the logs/ directory.

License

GNU General Public License v3.0 or later.

See LICENSE file.