Email or username:

Password:

Forgot your password?
Terence Eden

Today I was meant to be flying in to San Francisco to attend Twitter's Developer Conference - Chirp.

Twitter had paid for my flights and hotel, because I was one of their developer insiders. I planned to spend the week meeting friends old and new.

Instead, Alan the Hyperprat canceled the conference. So I'm staying in the UK.

So I'm going to spend the week hacking on Mastdon's #API and building cool shit. That'll show him!

You can see what I'm working on at shkspr.mobi/blog/2022/11/build

79 comments
Terence Eden

Oh! And I was meant to be attending a Belle & Sebastian gig tonight. I canceled those tickets for I could fly to SF.

So far, I reckon Alan's acquisition of Twitter has cost me close to £190.

Wonder if he's good for the money?

Terence Eden

One of the #MastodonAPI projects I'm working on is a better way to view long & complex threads.

You may have seen me build something similar for the other site a while ago - demo at shkspr.mobi/blog/2021/09/augme - so I'm hoping I can do something similarly interesting.

Main limitation is getting *all* of the conversation threads. It looks like the context API isn't paginated. But I might be being thick.

Benjamin S-B :verified:

@Edent Excellent project. You might have seen, but there's also this feature request for better 🧵 handling: github.com/mastodon/mastodon/i

Terence Eden

Cor! That @katebevan is good for engagement! Look at all those conversations she's kicked off!

Terence Eden

Indeed, how could they be?

That means that ID of a reply is different depending on where you see it.

So the ID of this post is:
mastodon. social /@ edent/ 123456

But when you see it on your server, it might appear as:
your. server /@ edent/ 987654

The #MastodonAPI copes with this really well. But it is a mite confusing to get one's head around.

ostephens

@Edent CW don’t appear in full on my client which means I didn’t have an easy way of seeing your initial point when I was reading the toot. Not sure if I’m missing something (probably) or if that’s just the way it is. Also my replies will default to using the same CW

Terence Eden

@ostephens that's just the way it is 🙂
Some clients allow you to remove CW.

ben

@Edent I think @ostephens means that because you use the CW effectively as a subject line, some clients when they expand the CW-ed post will hide the CW itself and therefore the subject of your post.

(Whereas some will expand the post but leave the warning in place, still readable. I've tried a few clients so far and seen both behaviours.)

Terence Eden

@benjamineskola @ostephens Oh, that's interesting.

I mostly use the web interface. I don't think there's a right or wrong answer.

ben

@Edent @ostephens It looks like the official iOS client treats it as a toggle: either the CW text is displayed or the rest of the post is displayed. But Metatext treats it like a “below the fold” thing with expanding and collapsing. And tooot displays both the CW and the body of the post with no separator because I’ve configured it to always expand CWs. Think you’re right that there’s not really one way that will always work best for every client.

ostephens

@benjamineskola @Edent that’s right. Which means it would work better for users of the iOS client if you were to include the information that is currently only in the CW at the start of the toot as well. Otoh it might be the impetus for me to try out an alternative client!

DELETED

@Edent the numeric IDs are not part of the protocol - it's all URL based. Pleroma uses UUIDs for example

ben

@Edent I ran into this recently: todon.nl/@benjamineskola/10934

I had assumed that an ID of a post on another server is effectively scoped to that server, so when I look for your post on my server it's `your.server/1234` which is different from `my.server/1234`.

ben

@Edent admittedly this is because I was being lazy and trying to deal with the API purely with string manipulation rather than doing it properly :)

Terence Eden

@benjamineskola tsk! Three Our Adas and five Hail Babbages for you, my child.

Terence Eden

This is *not* the optimal way to view a Mastodon conversation - but it gives you an idea of what it looks like as a tree.

Here you can see all the conversation threads - and which instances people are replying from.

Terence Eden

I can now read Mastodon conversations as proper threads on the command-line. Just as nature intended!

Some pretty simple #Python code which uses the #MastodonAPI.

All #OpenSource at codeberg.org/edent/Mastodon_To

Blog coming soon 😃

Andrew

@Edent I reckon feeding ActivityPub to NNTP could be interesting. Then a theaded Usenet reader could be used.

Use hashtags to cross post to different "newsgroups".

Hans-Cees

@Edent wonderful 👍
I have published some code to make a bot.

Taras Novak 🇺🇦

@Edent looks great! hot tip: use Textualize Rich Py package to color code those threads and message parts a bit. Make it cyberpunk hardcore! 😂

Julian Andres Klode 🏳️‍🌈

@Edent Let's just add a mastodon backend to neomutt so you can do it in style.

Митя Сошников

@Edent this should definitely be implemented as a feature in toot command-line tool!

Julia

@Edent Cool! This makes me want to disable auto-delete, so I can see what I was up to a year from now.

Terence Eden

@5SpeedFun I'm wary of archiving someone else's content without their permission.
But, yes, I do like the idea of a better threaded interface.

5 Speed All You Need

@Edent If the software exists, you know someone will do it....I mean I'd be surprised if someone doesn't, even if it's just <secret agency> of "democractic/free" country.

I wonder if this is something instances should prohibit in their rules?

Sarah Floris

@Edent that api is wonderfully easy to work with.

Terence Eden

@dutchengineer it is *so* much friendlier than Twitter's.
A few weird things to get my head around, but pretty well thought through.

Geeklawyer

@Edent@mastodon.socialUsenet used/uses (past tense offensive to some) a message id that is supposedly globally unique when a message is peered. Dunno if that's a valid comparison though.

Matt

@Edent Very cool. I remember the treeview thing you did for app.net, I loved that.

Terence Eden

@matt haha! Yup, that was aaaaages ago!
I'm mildly obsessed with conversation trees.

Andy Piper

@Edent recommend adding #mastodonapi for broader viz, BTW 🙂 :mastodon: 🦣

DELETED

@Edent you should build something that shares emotes instead of having the owner control it. :owi: another social media has this and they upload many emotes.

backseat

@Edent thanks for publishing your code - looks great!

Terence Eden

@Amandafclark not sure I understand? The link is one if the Mastodon API things I'm working on.

Amanda Clark

@Edent oh ok sorry. I just wanted to read more about the content of the toot and then it wasn't

John Allison

@Edent Wonderful idea. Look forward to seeing what you come up with.

Anton Piatek

@Edent presumably it gave some specific advantage? UUID or GUID would work for globally unique, no?

Terence Eden

@sldrant yes. You can't guarantee that an untrusted 3rd party won't deliberately reuse a GUID.

Go Up