Email or username:

Password:

Forgot your password?
29 comments
Manos Pitsidianakis (epilys)

@julienxx what happens if you dd if=/dev/random of=/mnt/mastodon/

rakoo
@julienxx echo 1 > /mnt/mastodon/110260524709055086/star
Martin

@julienxx What are your thoughts behind this? I myself could not imagine a use case for it, when thinking about it...

julien🛠️🛠️ :glenda:

@mado the idea is to make it the backend for my fedi client and anybody could use it as they see fit. Having everything as a file system is a very Plan9 thing

Csepp 🌢

@julienxx @mado
A nice example of it IMHO is the webfs family of tools on 9front, because it lets you have a single cookie cache shared among tools, instead of the mess that exists with browsers and other networking tools on Linux&co, where getting cookies from browsers into wget is a pain in the ass.

henesy

@mado @csepp @julienxx it's so nice being able to go through webfs instead of doing dumb cookie copy dances

rakoo

@mado @julienxx when everything looks like files, you can use all UNIX tools to build your own workflow. Your client is, effectively, your OS.

List last 10 toots:

$ ls /mnt/mastodon | sed 10q | xargs -I{} “echo -n {}/displayname said {}/content”

Unread badge in your statusbar:

$ find /mnt/mastodon -newer lastcheck $ touch lastcheck # the equivalent of “mark all as read

Backup:

$ rsync -avi /mnt/mastodon /storage

Using fzf for a semi interactive ui:

$ ls /mnt/mastodon | fzf –preview ‘w3m {}/content’

The last one, fzf, is currently my main pillar for my MUA, and I intend to also use it for my IM. The power of files is limitless. The ability to destroy a planet make HTTP calls is insignificant next to the power of the Files

@mado @julienxx when everything looks like files, you can use all UNIX tools to build your own workflow. Your client is, effectively, your OS.

List last 10 toots:

$ ls /mnt/mastodon | sed 10q | xargs -I{} “echo -n {}/displayname said {}/content”

Unread badge in your statusbar:

$ find /mnt/mastodon -newer lastcheck $ touch lastcheck # the equivalent of “mark all as read

sirjofri

@mado @julienxx imagine a thread of posts, but instead of manually navigate each post individually using a command and its previous output you can just navigate the structure and get all your data as files. Instead of looking at the whole thing from a distance and extracting a small piece of information you can just "walk into" the whole thing and change your perspective so that you only see what you want

Martin

@sirjofri Well, have a try.... Though, fediverse is more than file transfers. There are many status updates etc. where I think, that this would be hard to emulate on a file system level. But, anyway, good luck.

@julienxx

sirjofri

@mado @julienxx a filesystem is not about transferring files, it's about abstracting structured data in a hierarchy. Especially on 9, which has no "real" files, basically.

mia soweli

@julienxx nice! what are your plans client wise? i'd love to hook it up to acme :)

mia soweli

@julienxx finally a use for my acme library other than my little gridchat client :P

Anthony Sorace

@julienxx To be clear, this is a Mastodon client, not an ActivityPub implementation, yes?

Dave MacFarlane

@julienxx That's a cheery test for a screenshot.

But I think three might be a problem with your fs layout: it looks like you're using the an id without any qualifications. I haven't looked into how the mastodon code structures them, but I'm not sure (I doubt?) they're guaranteed to be unique across servers or perhaps even users on the same server. It's a big enough number that you probably won't have any collisions (unless it's timestamp-based?), but it's a theoretical possibility.

julien🛠️🛠️ :glenda:

@driusan good point! As far as I know these ids are specific to my instance hence unique but this might cause issues later on. I only envisioned it to be single user so far.

Dave MacFarlane

@julienxx but even on a single instance (or user) you're still going to be following accounts on other servers, no?

julien🛠️🛠️ :glenda:

@driusan yes, the ids are local copies of toots with an id specific to my instance I believe. Once federated the toot is copied with a local id I mean

f.rift

@julienxx [caption] Image is a screenshot of a text terminal, showing navigating fedi posts like a file system.

julien🛠️🛠️ :glenda:

@feonixrift thanks and sorry I haven’t implemented alt-text in my tool yet 😅

f.rift

@julienxx Not a problem! Normally I don't boost uncaptioned images, but this was so good. I try to provide caption when something clears that bar where I'm too excited not to share it anyway.

f.rift

@julienxx and even so I missed noticing that the screenshot was of the post producing itself. Brilliant!

Go Up