💥: now incompatible with Twitter

This commit is contained in:
VC
2025-01-13 17:11:19 +01:00
parent e99a666b18
commit 9da43beb34
7 changed files with 688 additions and 1058 deletions

View File

@@ -1,4 +1,4 @@
# oolatoocs, a Mastodon to Twitter/Bluesky bot
# oolatoocs, a Mastodon to Bluesky bot
## A little bit of history
So what is it? Originally, I wrote, with some help, [Scootaloo](https://framagit.org/veretcle/scootaloo/) which was a Twitter to Mastodon Bot to help the [writers at NintendojoFR](https://www.nintendojo.fr) not to worry about Mastodon: the vast majority of writers were posting to Twitter, the bot scooped everything and arranged it properly for Mastodon and everything was fine and dandy. It was also used, in an altered beefed-up version, for the (now defunct) Mastodon Instance [Nupes.social](https://nupes.social) to make the tweets from the NUPES political alliance on Twitter, more easily accessible for Mastodon users.
@@ -7,24 +7,21 @@ But then Elon came, and we couldnt read data from Twitter anymore. So we had
## And now…
Hence `oolatoocs`, which takes a Mastodon Timeline and reposts it to Twitter as properly as possible. And since Bluesky seems to be hype right now, it also incorporates Bluesky support since v3.
Hence `oolatoocs`, which takes a Mastodon Timeline and reposts it to Bluesky as properly as possible.
Bluesky support is mandatory for now on: you cant have Twitter or Bluesky, you must have both. I might change this behaviour in a near future, especially when I will inevitably have to drop support for Twitter. If you just want Twitter support, just stick with v2.4.x release, itll get the job done exactly as the newer version for now.
If you dont want Twitter support, open an issue and I will get motivated to comply (maybe…).
Since 2025-01-20, Twitter is now longer supported.
# Remarkable features
What it can do:
* Reproduces the Toot content into the Tweet/Record;
* Cuts (poorly) the Toot in half in its too long for Twitter/Bluesky and thread it (this is cut using a word count, not the best method, but it gets the job done);
* Reuploads images/gifs/videos from Mastodon to Twitter/Bluesky
* Reproduces the Toot content into the Record;
* Cuts (poorly) the Toot in half in its too long for Bluesky and thread it (this is cut using a word count, not the best method, but it gets the job done);
* Reuploads images/gifs/videos from Mastodon to Bluesky
* ⚠️ Bluesky does not support mixing images and videos. You can have up to 4 images on a Bsky record **or** 1 video but not mix around. If you do so, only the video will be posted on Bluesky.
* ⚠️ Bluesky does not support images greater than 1Mb (that is 1,000,000,000 bytes or 976.6 KiB). I might incorporate soon a image quality reducer or WebP transcoding to avoid this issue.
* Can reproduce threads from Mastodon to Twitter/Bluesky
* Can reproduce poll from Mastodon to Twitter
* ⚠️ Bluesky does support polls for now. So the poll itself is just presented as text from Mastodon instead which is not the most elegant.
* Can prevent a Toot from being tweeted/recorded to Bluesky by using the #NoTweet (case-insensitive) hashtag in Mastodon
* Can reproduce threads from Mastodon to Bluesky
* ⚠️ Bluesky does support polls for now. So the poll itself is just presented as text from Mastodon instead which is not the most elegant.
* Can prevent a Toot from being recorded to Bluesky by using the #NoTweet (case-insensitive) hashtag in Mastodon
# Configuration file
@@ -41,12 +38,6 @@ client_secret = "<REDACTED>"
redirect = "urn:ietf:wg:oauth:2.0:oob"
token = "<REDACTED>"
[twitter] # youll have to get this part from Twitter, this can be done via https://developer.twitter.com/en
consumer_key = "<REDACTED>"
consumer_secret = "<REDACTED>"
oauth_token = "<REDACTED>"
oauth_token_secret = "<REDACTED>"
[bluesky] # this is your Bsky handle and password + a writable path for the session handling
handle = "nintendojofr.bsky.social"
password = "<REDACTED>"
@@ -63,12 +54,6 @@ oolatoocs register --host https://<your-instance>
And follow the instructions.
## How to generate the Twitter part?
Youll need to generate a key. This is a real pain in the ass, but you can use [this script](https://github.com/twitterdev/Twitter-API-v2-sample-code/blob/main/Manage-Tweets/create_tweet.py), modify it and run it to recover you key.
Will I some day make a subcommand to generate it? Maybe…
## How to generate the Bluesky part?
Youll need your handle and password. I strongly recommend a dedicated application password. Youll also need a writable path to store the Bsky session.