Email or username:

Password:

Forgot your password?
Top-level
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.

A text-based tree showing replies at various depths.
58 comments
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!

A very long thread of conversations - many people replying to each other.
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.

A long list of Mastodon statuses all indented according to where they come in the conversation.
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 šŸ˜ƒ

A Linux terminal. A complex conversation tree is displayed. You can see the timestamp of posts, who posted, what they're saying, and the URl of the post.

The conversation goes at least 8 levels deep.
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".

patter

@puck @Edent they do have a similar feel, in some ways

George Jones :emacs: :orgmode:

@puck you're not wrong. A mastodon could just be a news feed. Small hacks to make it bidirectional and #usenet is back. Use your favorite newsreaders: rn, gnus,...

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.

Folker

@Edent Hey cool, you can read two dozens messages in a fraction of a second where normal people like us have to scroll for ages šŸ˜ƒ

Terence Eden

@folkerschamel it may well be the perfect way to read Mastodon šŸ˜€

George Jones :emacs: :orgmode:

@Edent maybe repost each message to a #usenet news server and we will have come full circle:-)

palesz

@Edent wait, you just reimplemented usenet!

mmsz

@Edent B-but nature intended wrapping at 80 characters per line šŸ˜ž

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.

Go Up