在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):renatolond/mastodon-twitter-poster开源软件地址(OpenSource Url):https://github.com/renatolond/mastodon-twitter-poster开源编程语言(OpenSource Language):Ruby 88.6%开源软件介绍(OpenSource Introduction):Mastodon-Twitter CrossposterThis is an app for crossposting between Mastodon and Twitter. The app is made so that multiple users can connect to it using the OAuth interface from both Twitter and Mastodon and choose options on how the crosspost should work. If you just want to use it, there's one running at https://crossposter.masto.donte.com.br, which you can use from most Mastodon servers (except the ones suspended at masto.donte.com.br). Features
The crossposter will never follow anyone or post anything but the content you selected to be crossposted. If you decide to crosspost from Twitter to Mastodon, remember to turn on notifications about when people mention you to avoid not seeing interactions! Note on usageThe crossposter is made with multiple users in mind. For that reason, it can be quite a lot of moving parts if you want to self-host yourself. There's other good tools to self-host out there like https://github.com/AmauryCarrade/MastodonToTwitter and the others listed at the Bridges from/to other platforms section of the Mastodon apps. That being said, it should work even if you only want it for your own usage. Ruby on RailsRuby 3.1.0 Rails 7.0 RequirementsWithout extra configuration, a local postgres instance is needed. Node is needed for assets compilation, can be installed using nvm. The poster uses the ruby-filemagic gem for detecting the types of the files posted. Follow the instructions described in the README to install the needed library and headers. Pre-setup
SetupNote: If you are running side-by-side with Mastodon or other sidekiq-using software, you need to configure redis to avoid issues with mixed jobs. More info at the end. You need to install Yarn and Ruby 3.1.0. Yarn has installation instructions for several OSs here: https://yarnpkg.com/lang/en/docs/install/ and Ruby can be installed either using RVM (https://rvm.io/rvm/install) or rbenv (https://github.com/rbenv/rbenv#installation). After you have ruby and yarn setup, you'll need to do:
A separate user is recommended. If you want the crossposter to send data to a statsd instance, you need to configure the appropriate variables in the .env file. You can check the example for reference. Before starting for the first time, you need to generate the assets and setup the database:
An example nginx configuration can be found at An example of the configuration file is provided at To start the web app, you need to do:
If you are using systemd, you can create a service with something like:
And put it on And a second one like this:
And put it on These example files are provided in the Running side-by-side with other sidekiq/redis applicationsIf you are running the crossposter on a server with other sidekiq/redis applications, you need extra configuration to make sure everything is separated. For a more in-depth information, you can check out Sidekiq Wiki, but one thing you can do it's to use another redis db, which could be done by creating a file in
You need to replace all values with actual values relevant to your server. Running in Docker
Blocked or allowed domainsYou can add At the same time, you can add You should only enable one at each time. Admin tasksIf you are an admin, you might want to make yourself an admin, which allows you to take a look on the status of the sidekiq queues (and solve possible issues that happen regarding users crossposting). To do so, you can run:
If you want a user to no longer be an admin of your crossposter, you can make so by running
TestsRun StartingTo start the project locally, you should use For production, you need sidekiq to process jobs (that is, to post accross the networks), but you only need the webserver if you want to change configurations or to allow new signups. If you're in a single user setup, you can start and stop the webserver as needed. TroubleshootingIf your server crashes and the crossposter is not correctly turned off, it might happen that jobs get into a state in which they are not able to recover by themselves. The symptom in this case is that no posts get crossposted and if you navigate to https:///sidekiq, no jobs get ever added to the queue. If you get to that case, and there's a digest in the "unique digests" tab even without a corresponding job over at the "busy" tab, you can remove the unique digest and the job that inserts the status should start running again. Experimental Content Warning recognitionWhen posting from Twitter to Mastodon the Crossposter tries to detect content warnings in the tweets and post them over to Mastodon. The detected CW takes precedence over the default twitter one if exists. Some formats are supported and more can be added in the future, but currently, this are the ones that will be recognized:
All of these posts will be posted in Mastodon with the same content: This also works for quote-retweets. That is, if you are retweeting and you want to add a content warning to the tweet, you can just quote-retweet writing This does not work for several tweets in a thread. Each tweet needs to have it's own CW. Even though this is an experimental feature, it cannot be disabled. The reason is that content warnings are important for people in Mastodon and the crossposter should still try to keep it in a good environment, even if bringing content from Twitter. ContributingMastodon Twitter Crossposter is 100% free and open source. We encourage and support an active, healthy community that accepts contributions from the public – including you! There's a high level description of the crossposter over at development help. You can start there and ask questions as needed! LicenseCopyright (C) 2017-2018 Renato Cerqueira & other crossposter contributors This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论