Sync your message on discord, twitter(write only) and telegram. Currently supported for text messages and image.
Fork the project and follow the commands below for quick setup:
git clone https://github.com/{your_github_username}/social_syncup.git
cd social_syncup
python -m venv venv
venv\Scripts\activate (This is for windows, google and get your OS command for activating the virtual environment in python)
pip install -r requirements.txt
python setup.py
# Follow the steps in order to setup things
- If working with Telegram you will be asked for telegram registered number.
social_syncup.session
andsocial_syncup.session-journal
file will be generated which should not be deleted. - Setup the repository secret which will be printed at the end. (You can also store these in
.env
file to test locally) - Make project private if working with telegram, and don't forget to push
social_syncup.session
andsocial_syncup.session-journal
to your repository.
- Create write access secrets for twitter from here.
- Create discord bot with read write access from here.
- Get telegram secrets from here.
TELEGRAM_API_HASH = <TELEGRAM_API_HASH>
TELEGRAM_API_ID = <TELEGRAM_API_ID>
TELEGRAM_GROUP_NAME = <TELEGRAM_GROUP_NAME>
TWITTER_API_KEY = <TWITTER_API_KEY>
TWITTER_API_KEY_SECRET = <TWITTER_API_KEY_SECRET>
TWITTER_BEARER_TOKEN = <TWITTER_BEARER_TOKEN>
TWITTER_ACCESS_TOKEN = <TWITTER_ACCESS_TOKEN>
TWITTER_ACCESS_TOKEN_SECRET = <TWITTER_ACCESS_TOKEN_SECRET>
DISCORD_CHANNEL_ID = <DISCORD_CHANNEL_ID>
DISCORD_SERVER_ID = <DISCORD_SERVER_ID>
DISCORD_TOKEN = <DISCORD_TOKEN>
SOURCE = <SOURCE> (Where you will be writing. "telegram" or "discord")
TARGET = <TARGET> (Where this automation will writing. "telegram", "discord" or "X (formely Twitter)")
All these secrets need to be setup in the respository secret. So that the gihub actions can use these values to run the scripts.
- This repository will only on worklfow dispatch. In order to run for every hour, uncomment line number 5 and 6 given in
.github/workflows/perform-syncup.yml
. - To customize the time when this repository runs change the cron notation give on line number 5 and 6 given in
.github/workflows/perform-syncup.yml
. - Create your custom cron notaton here
- Need customization is this code ? Reach out to me on twitter and I might be able to help you.
- You only need secret from platforms you are using. Example: If working only with twiiter and discord, only those secrets are needed, and telegram can be ignored.
If you liked something about this repository, do give it a 🌟. It will motivate me come up with more such project. You can reach out to me on my social media given below.