-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What does ActivityPub do, no bullshit please. #1
Comments
I have been digging into Mastodon this week, but not deeply enough to have figured out the endpoints yet. From what little I've seen of the tech stack, it seems like:
Mostly I've just been trying to get a non-technical feel for things. Here are some interesting things I've run into. Things Mastodon does right
Other odd or curious bits
The vibe Overall, I'm enjoying the experience. There are bunch of people posting on #BikeTooter, for example. The vibe is pretty chill and positive right now. Possibilities Based on my very limited understanding, it should be possible to implement an RSS-to-ActivityPub gateway. And people should be able to subscribe normally from Mastodon. And you have some flexibility about what you send—more than 500 characters, or even something more like PixelFed. Anyway, I wish I had more technical details, but this is what I've had time to figure out so far. |
That's what I want. And I already have the RSS parser part of it, we just need a way to send the data in an RSS "packet" over an ActivityPub channel. If you want to see what that looks like, here's the package I use to parse my feeds. And here's a place you can parse a feed to see what you get back. Sorry it doesn't have a better UI. ;-) |
I think this project might handle RSS-to-ActivityPub posting. https://github.com/dariusk/rss-to-activitypub |
@jludington -- there's so much there -- i have no idea where to begin. i need something that fits into my world. i also am overloaded with a huge project, FeedLand, so I need something practically designed to plug into my world, which is this -- I generate and consume feeds in RSS. Those have to make sense in the Mastodon environment. I get that this project has something to do with that. |
To be clear -- here's a feed. http://data.feedland.org/feeds/davewiner.xml When I post something to that feed, I want it to appear in a subscribable object in MastodonLand. We support rssCloud, the native notification service of RSS 2.0. So the items should appear in MastodonLand almost instantaneously. |
I can see at least two paths forward: 1. Easy: Use Megalodon to push content to an existing Mastodon serverThis is probably the easiest approach, because you don't have to implement ActivityPub, handle subscriptions, or send messages to subscribers. It looks pretty easy: import generator, { Entity, Response } from 'megalodon'
const BASE_URL: string = 'https://mastodon.social'
const access_token: string = '...'
const toot: string = 'test toot'
const client = generator('mastodon', BASE_URL, access_token)
client.postStatus(toot)
.then((res: Response<Entity.Status>) => {
console.log(res.data)
}) Of course, this assumes you have an account or a server somewhere. If you want to run your own, Masto.host had a nice $6 plan, but they're overwhelmed this week and there's a wait list. Or you could install Mastodon on a Linux server somewhere. One of my friends is doing that and he said it wasn't completely awful. 2. Harder: Implement ActivityPubThis requires a bunch of moving parts, and I'm still really vague on it all:
But I may be very wrong about these things, because I haven't read the spec yet. I feel like (2) is simply too large at this point, until somebody writes a nice server library that implements all the hard bits. |
Sure, I can find an hour or two next week! Would screen sharing work for you? This looks like the official Mastodon image for Digital Ocean. They say we'll need:
For SMTP, do you already have a working email server? If so, we should just be able to use an account on that. If you don't currently have your own email server, I've had good luck with Sendgrid (long ago). They have a free plan with 100 emails/day, which should be enough to run Mastodon. The advantage of using Sendgrid is that they'll jump through all the hoops needed to deliver email to GMail. I think you just need the email for things like sign-up confirmation and password reset? Then we can log in, create a "bot" account, and grab the API token. After that, I think it's dead simple. I'm actually pretty excited about having a microblogging API again. The world lost a lot of cool innovation when Twitter shut down most of their API. |
@emk -- i use Amazon SES, but I don't want to use it for this purpose because if i get reports for spam (I don't control the software here so that could happen I imagine) it would create problems for the other applications i use it for. Let's do this in a private thread. |
"Mastodon exports RSS. Just add ".rss" to anyone's profile URL." That's what stands out for me. Thanks @emk . Thanks Dave! |
@emk — twitter has an excellent api. I use it for lots of stuff. We’ve got a fairly complete scripting api for Twitter in drummer. I do all my communication with their api through a package called davetwitter, mit license. It would be a good interface for a mastodon api. Flatten out the diffs. Here’s the recent blog post I wrote about this… http://scripting.com/2022/11/10.html#a181757 and the docs for the twitter verbs in drummer, all done thru their api. https://github.com/scripting/docServer/blob/main/docs/pages/twitter.md |
@scripting I set up a test Mastodon instance on Digital Ocean this week, and set up a new account at SendGrid to handle the mail. It was not a straightforward as I would have hoped, but I documented my steps and maybe it will save someone some time. 😃 After setting up the account, SendGrid wants you to set up a "Sender Identity". They have two choices... Domain Authentication or Single Sender Verification. For Single Sender Verification they wanted my physical address, so I backed out of that. For domain authentication they wanted me to add 3 CNAME entries to my DNS, which I did and the domain was authenticated. After that is was easier. In the Setup Guide I went to "Send your first email", "Web API or SMTP Relay", picked "SMTP Relay", where I created an API Key and it showed the details for SMTP. I then installed the Mastodon droplet on Digital Ocean and went through the install prompts on the first SSH connection. I first made the mistake of setting my Gmail address as the FROM address... SendGrid rejected it. The FROM address has to be on the authenticated domain (for me xxx@papascott.de). |
Thinking out loud.. Right now micro.blog is the only blogging site that supports inbound RSS that I know of. Which makes it an incredibly interesting place for FeedLand to peer with, because we are the hotspot for feeds. We bring them in and ship em out. And in the process you can categorize stuff, push it out with the click of the Like button and we also do categories very nicely and in a functional way that you end up actually using (this is something I've been trying to accomplish my whole freaking career). I think this is the future. I call it Two-way RSS. The first way is the one we all know about, outbound. But inbound? well as far as the state of the art in 2022 is concerned, every inbound RSS app today is a feedreader. Except micro.blog. I think there will be an explosion of inbound RSS apps. I want WordPress to do it. Substack. And Mastodon. There should be a new address for a user. Here's an idea -- let DNS do it. More thinking to do... |
There is no native support for it in WordPress (Self hosted version). But I have been using a plugin to pull the RSS feed and make it into a post. Its called WPeMatico (GitHub, WP Plugins). It works well. In fact recently I added My Feedland Likes feed to be cross posted to my blog. Its not native but works. I hope it becomes native. |
@thejeshgn -- that's beautiful. your linkblog requires exactly one gesture, clicking the like icon. It can't get any simpler than that. I've been emailing on and off with Matt this year, and I've asked him to do this. |
So what specifically would support for "two-way RSS" look like in Mastodon? Woudl be be akin to the rss-Mastodon bots that now exist but built into the platform itself? For example of that: https://indieweb.social/web/@boingbot@mastodon.cloud |
@Timothyjchambers -- exactly. ;-) |
@scotthansonde -- i got pretty far, up to the point where I could create a user account and it sent an email to verify, but when I clicked the link it was directed to http://url9896.scripting.com/, which I recognized as one of the domains used when I set up the sendgrid account. I deleted the cnames after registering, figuring that they were just used to identify me, but apparently they serve some other purpose after setup? I tried changing the url9896 to "masto" which is the address of the server but that didn't work either. |
@scotthansonde @emk -- I tried starting over from scratch and hit a different problem this time. This isn't a good job for me. I'll use someone else's Mastodon server. |
Sorry to hear it. Do you know anyone who's running a server? |
@emk -- yes @scotthansonde has gotten it working. He's much better at this kind of stuff than I am. I will offer to pay for a server if one of you guys want to set it up and will do the DNS setup. |
No spam. Stay on topic. Thanks. |
@scripting I'll be happy to invite you to my test Mastodon instance if you'd like to test the API. |
Thank you @scotthansonde! You’re incredible. Could you invite @emk too? |
@scripting I'll prepare an invite for @emk as well |
https://github.com/scripting/reallySimpleActivityPub/tree/main/scriptingglue
BTW, no pull requests. If you have code to add, send it to me and I will
add it.
And please try to stick to coding conventions. I will have to reformat
otherwise.
I think we have a very workable way to do this.
Eric, Scott and I have been working toward this kind of collaboration, he's
been working on the Chromebook version of Electric Drummer, which I think
you would like, time-willing of course.
Scott, Eric is a longtime Scripting News hanger-on. He shows up every once
in a while when we're doing something that interests him and often makes a
big contribution. His biggest has been the C++ implementation of XML-RPC
which was very widely used, and really helped push forward the standard.
The goal here is to build a glue scripts table for Drummer parallel to the
one for Twitter, except for Mastodon. Where ever possible I want to use the
same verb names and interface.
Dave
PS: I'm going to put this (edited) in a new thread on the repo.
…On Tue, Nov 15, 2022 at 9:07 AM Scott Hanson ***@***.***> wrote:
@scripting <https://github.com/scripting> I'll prepare an invite for @emk
<https://github.com/emk> as well
—
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAM32O6AGGGRAREXUI345VTWIOKJJANCNFSM6AAAAAARYPR2K4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
The scenario
I have a server that receives twitter-like posts, and twitter-like posts emanate from it.
I have users who use my server, so there must be some way to do identity.
So it's --
What else is there? Correct answer is nothing. Or prove me wrong. 😄
Endpoints
I need a list of endpoints an ActivityPub server needs to support.
PS: Right now, to begin with I don't care about interop'ing with anyone. Let's get the basics right first.
The text was updated successfully, but these errors were encountered: