Skip to content

fuuman/telegram-group-media-backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

telegram-group-media-backup

backup all media of your telegram groups into your owncloud 📥 💙

This code can run as bot for the telegram messenger. After creating your own bot and connecting it to that script via config.ini, you can add it to a telegram group. Take care, that the privacy mode of your bot is disabled. If it's not, your bot cannot read the messages sent to your group. After adding every photo, video or file sent to that group will be backuped to a configured folder on an owncloud server.

What you need

  • a telegram bot token (create via bot father)
  • running owncloud server
  • optional: a server where your bot can run (You can run it locally on your PC, but if your session is closed or the PC powered off, there will be no backups. So I would suggest you to use free providers like heroku if you aren't running a server on your own.)

How to start

  • git clone https://github.com/fuuman/telegram-group-media-backup.git
  • cd telegram-group-media-backup
  • cp config.ini.example config.ini
  • edit config.ini and fill in your configuration data (you need to create a new telegram bot first)
  • pip install -r requirements.txt in a new virtualenv using python3.6

To test if everything is working well, you can run python main.py and add your new bot to a telegram group now. Sending a file to the group should let it appear in your owncloud.

Information

Used

This bot was implemented using the python-telegram-bot, a nice wrapper for the official Telegram API.

TODO

  • add more cloud storage provider

LICENSE

MIT License

Copyright (c) 2017 Marco Schanz

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages