mastodon-to-twitter

Mas2tter - the Mastodon-to-Twitter Mirrorbot
授权协议 View license
开发语言 Python
所属分类 应用工具、 IM/聊天/语音工具
软件类型 开源软件
地区 不详
投 递 者 子车凌龙
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Mas2tter - the Mastodon-to-Twitter Mirrorbot

This Python3 script loads the latest Toots from your Mastodon account and posts them on Twitter.Some formatting is done to keep the content of Tweets in 280 characters, possibly posting two Tweets.

You can choose to either link to your Toot so others can click through to your Mastodon profile (see screenshot below) or use the alternative plain text mirror. The config parameter link_to_mastodon is used for this.

Your Tweets will contain some of your original Hashtags. Set the config option tags_to_append for this.

Setup

Fill the config values api_base_url and user_base_url as given in the example. The API base URL is most likely the root domain of your instance, the user base URL is a simple text string which is used to check Tweets that contain Mastodon URLs to your Toots. (Better have a look into the code, it gets clear there)

Changelog

Versions <v2.0.0 do not use the streaming API, but instead regularly pull the latest Toots made by a user and compares the locally saved Toot ID to find out, if new Toots were posted. If yes, they are cross-posted to Twitter.

Version v2.0.0 introduces the usage of the streaming API, meaning that Mas2tter listens for new Toots and acts based on events sent by the server. The old pull script is still available in sync_existing.py, it can be used to sync existing Toots which will not be seen by the stream listener. Please note that the script uses the old-style formatting.

Version v2.1.0 introduces multiple Tweets, if the character limit of 280 characters is exceeded. The Toot is then split in half (based on spaces between words) and two Tweets are posted.

Version v2.2.0 introduces command line arguments to use different config files and to enable debugging output. Exception handling was extended to hopefully handle more connection errors.

Libraries and tokens

This bot uses Python-Twitter and Mastodon.py. To set up the needed access keys/tokens follow the instructions there. Mas2tter has no running public instance to date. If you do not have the resources to set it up on your own, have a look at crossposter.masto.donte.com.br (Github repo).

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU 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 General Public License for more details.

More in LICENSE.

 相关资料
  • PHP Feed-to-Bot Tool for Mastodon A tool for creating bots for Mastodon which read RSS/Atom feeds. Features: Multiple bots from one script Multiple feeds per bot Supports (valid) RSS and Atom Stateles

  • 当我在网上做研究时,似乎人们也在这个堆栈中使用SQS,SNS会将信息放在SQS上,然后SQS会调用Lambda。 我想我想理解的是在这方面对SQS的需求。这增加了什么价值?换句话说,直接从SNS调用我的Lambda会失去什么?

  • .to( target:Object, duration:Number, vars:Object, position:* ) : * 添加一个TweenLite.to()动画到时间轴,相当于add(TweenLite.to(...)),以下两行产生相同的结果: myTimeline.add( TweenLite.to(element, 1, {left:100, opacity:0.5}) );

  • 我正在测试在服务器上设置一个Git(EC2-Linux,Amazon)。一切都很好,但我做了一件事,我不能复制,我想理解。 我正在遵循以下Git在服务器https://git-scm.com/book/en/v2/git-on-the-server-setting-up-the-server上的教程 我创建了4个用户进行测试,并在服务器上创建了他们的ssh密钥。(User Git)在/home/G

  • 描述 (Description) 如果你想打开浮动操作按钮酥料饼的点击,那么你可以使用floating-button-to-popover类。 例子 (Example) 下面的示例指定使用变形过渡(创建的具有平滑的动画内容的外观)在酥料饼的内容的呈现 - <!DOCTYPE html> <html> <head> <meta name = "viewport" content =

  • 一个无后端待办事项应用,数据用 LeanCloud 进行同步。 简介 这是一个无后端的待办事项应用,数据用 LeanCloud 进行同步,也是我的第三个 iOS 项目。 做这个项目的初衷是想比较全面地体现我的前后端水平,该同步算法从整理思路到实现 95% 的代码(意为接近稳定)花了两周时间,除思路外没有任何代码可以参考(反正我是没有找到... 界面设计来源于 DO ,部分素材和界面为本人设计。 该