» · 3.5 · 3.5img · lab8 · ok · qrstuv · sl · subversive

site map

snac2

frontendin' alien toots

Using snac2 and links2 to display mastodon toots from foreign instances.

ema, snac and grunfink, the real one

Links2 doesn't store your passwords anywhere, but as long as an instance of links2 is open, new windows share its configuration, including signed in websites.

Note: TUI links and graphical links do not share logins, but this guide works for either. You just can't combine them.

start links2, sign in to your snac account

snac login

As long as this links2 window will remain open, newly created links2 instances will remember that you're logged in to your snac account.

Receive a url to an alien mastodon server

mastodon in links

In this example I'll be using the following url (with permission).

https://mamutovo.cz/@merz/112766127305936007

As you can see and probably already know, most mastodon implementations are not links2 friendly and require javascript. So let's use our snac to view this particular url.

The sane method

snac search bar

The search bar is fairly shy, hiding just underneath your profile picture with no buttons. This is where you can paste any mastodon url, whether it be an account or a specific toot.

snac search result

Paste in a url and hit Return. After the page loads, press Ctrl-E to jump to the bottom of the page quickly.

The also sane method

Now that you are signed in to your snac2 account and have kept that links2 window open somewhere, you can write a simple script that will parse the random mastodon urls that you come across and open them in a new links2 window (or terminal).

snacit

In this example I call the script snacit, placed in PATH.

!#/bin/sh
snac_server=my.snac.tld
username=mysnacusername
links -g "https://$snac_server/$username/admin?q=$*#snac-posts"

Usage: %snacit "mastodon-url"

snac it

A new links2 window will open with the parsed mastodon url.

Cool.

resources: