Sync Mastodon to Twitter nicely one-way. A very specific fork from twoot.py (you should probably just use that!)
I forked it because:
- I wanted to use an access_token from my Mastodon instance instead of user/pass because 2FA
- I only want Mastodon > Twitter
- I wanted a link back to Mastodon (so people understand, that's where I am)
I have stripped this thing down; it does not have the nice setup that twoot.py has, it is very specific to my setup, it is here so I both don't lose it and in case anyone else wants a more limited version.
The twoot.py setup usually creates this file in the program name folder at your home directory (e.g., ~/.ribeiro-social-sync.py/default.config), so you'll have to create this yourself should you dare.
{
"mastodon": {
"client_id": "",
"client_secret":"",
"access_token": "",
"api_base_url": ""
},
"twitter": {
"consumer_key": "",
"consumer_secret": "",
"access_token": "",
"access_token_secret": ""
}
}
Other things you'll need:
- Setup in your mastodon instance the require app (e.g., https://[YOUR-INSTANCE]/settings/applications/)
- Setup an elevated app on Twitter (https://developer.twitter.com/en/portal/dashboard)
Every 15 minutes, check and sync as needed.
*/15 * * * * python3 /work/src/ribeiro-social-sync/ribeiro-social-sync.py --log=/home/justin/.ribeiro-social-sync.py/cron.log >> /home/justin/.ribeiro-social-sync.py/cron.log 2>&1
This software is distributed under the MIT license and was forked from Takuto ASAKURA (wtsnjp) twoot.py project.