• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

qbit/mycete: A matrix.org micro-blogging (twitter,mastodon) connector.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

qbit/mycete

开源软件地址(OpenSource Url):

https://github.com/qbit/mycete

开源编程语言(OpenSource Language):

Go 99.6%

开源软件介绍(OpenSource Introduction):

mycete

Build Status

BETA: Software is used frequently but Bugs may still appear and behaviour may change at any commit

Riot/Matrix room: #mycete:tapenet.org

A matrix.org micro-blogging (twitter,mastodon) connector.

mycete pipes your chat messages from matrix to twitter and/or mastodon. It does this by listening in on a channel you create. Everything you enter in the channel will be published to your various feeds!

Optionaly, only stuff you prepend with a ''guard_prefix'' will be published. Obviously the prefix will be removed first.

Delete tweets and toots you posted by redacting the corresponding matrix message.

If you upload images to the controlling matrix room, they will be appended to your next toot and tweet.

Tweets and Toots may be favoured or reblogged / retweeted by using the reblog_cmd or favourite_cmd (specified in the [matrix] section) followed by the status URL or ID

Example Information Flow

see also slides of lightningtalks which can be found here

from Mastodon back to Matrix

mycete will also (optinally) inform you about toots that did not originate from mycete as well as when someone favourites or reblogs your status and when someone follows you.

The controlling settings are show_mastodon_notifications, show_own_toots_from_foreign_clients and show_complete_home_stream in [matrix]

If you don't need this, just remove the feed2matrix section.

Additionally it is possible to mirror your complete homestream or just part of it to other matrix rooms. For each room you may filter by tag, post visibility, sensitivity, weather it is an original toot or a reblog, weather our account posted it or someone else and weather or not we are following the author.

To do this, create a separate configuration section for each room named feed2morerooms_xxxxx where xxxxx is your name for that configuration. You can specify arbitrary many configurations, as only the ones listed in [feed2morerooms]configurations are activated and used.

In addition to the home stream, it is possible to subscribe tag streams using [feed2morerooms]subscribe_tagstreams which will be mixed together with the homestream into one big stream which your configurations (s.a.) will then filter.

If you don't need this, just leave configurations empty or remove all feed2morerooms sections.

Building

git clone https://github.com/qbit/mycete
cd mycete
go build

Example Config

[server]
twitter=true
mastodon=true

[matrix]
user=@fakeuser:matrix.org
password=snakesonaplane
url=https://matrix.org
room_id=!iasdfadsfadsfafs:matrix.org
guard_prefix=t>
reblog_cmd=reblog>
favourite_cmd=+1>
join_welcome_text="Welcome! Warning: Everything you say I will toot and/or tweet to the world if it starts with t>"
admins_can_redact_user_status=false

[twitter]
consumer_key=
consumer_secret=
access_token=
access_secret=

[mastodon]
server=https://mastodon.social
client_id=
client_secret=
access_token=

[images]
enabled=true
temp_dir=/tmp

[feed2matrix]
show_mastodon_notifications=true
show_own_toots_from_foreign_clients=true
show_complete_home_stream=false
characterlimit = 1000
imagebyteslimit = 4194304
imagecountlimit = 4

[feed2morerooms]
subscribe_tagstreams=interesstingtag otherinteresstingtag
configurations=filter1 filter2

[feed2morerooms_filter1]
target_room=!example1:matrix.org
filter_visibility=public
filter_for_tags=interesstingtag
filter_sensitive=false
filter_reblogs=false
filter_myposts=true
filter_otherpeoplesposts=false
filter_unfollowed=false

[feed2morerooms_filter2]
target_room=!example2:matrix.org
filter_visibility=public
filter_for_tags=otherinteresstingtag
filter_sensitive=false
filter_reblogs=true
filter_myposts=false
filter_otherpeoplesposts=false
filter_unfollowed=true


Linking to Mastodon

When logged into your Mastodon Account in your web browser, go to "Settings", then "Development", then "Your Applications". Create a New Application and give it the required permissions. Put Client key, Client secret and Your access token the tokens into your 'mycete' configuration.

required permissions

read:accounts read:blocks read:favourites read:filters read:follows read:lists read:mutes read:notifications read:search read:statuses write:conversations write:favourites write:filters write:media write:statuses push

Linking to Twitter

Oauth via console pin. (TODO)

TODO

  • create an interface for clients.
  • TravisCI.
  • Read the timelines back into the matrix room.
  • favorite and reblog Mastodon status
  • un-reblog and un-favourite when redacting matrix message
  • tests
  • Document the process for getting api keys.
  • Only establish our oauth / auth stuff when a service is enabled.
  • Post to RSS for blogging? (Mastodon already does rss out of the box)
  • Error early if our service is enabled and we have invalid credentials. (See if there is API for testing?)
  • post images
  • support uploading multiple images per Toot/Tweet
  • more feedback and user error guards
  • use constrained memory, not slowly ever growing maps. Aka don't be a memory hog
  • twitter stream to matrix, favorite and retweet
  • look into support for small videos
  • optionally redact matrix imagemessages after a while, thus not clobbering matrix-synapse storage



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
kimonoki/tg-mstdn: Toot on mastodon using telegram bot发布时间:2022-08-17
下一篇:
hecateball/mastodon4j: Java library for the Mastodon API发布时间:2022-08-17
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap