Bizordec / vk-to-tgm

An application that forwards wall posts and playlists from VK community to Telegram channel.
GNU General Public License v3.0
43 stars 4 forks source link
bot celery python telegram telegram-bot telegram-channel telethon vk vk-api vk-callback-api vkbottle vkontakte

vk-to-tgm

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

Consists of following services:

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
  2. Install Nginx and run command
    ./vtt-cli.sh setup_nginx
  3. Sign in VK and Telegram
    docker compose run --rm -it sign_in
  4. 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](setup/ssl/README.md).

## Uninstallation
Run `uninstall.sh` script.
### Docker uninstallation
```sh
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.