my website
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

added the first actual blog post, and a link to the blog on the homepage

chfour f3f872db 2a6bfdd5

+63 -4
+44
src/blog/2025-09-16-mastodon-stats/content.djot
··· 1 + Download a data export/data archive. On Mastodon and derivatives, go into Settings -> Import and export -> Export. 2 + Click "Request your archive" and wait for the download link. Open a terminal, install [jq](https://jqlang.org/) 3 + if you don't have it, navigate to your extracted archive, and run the following one--liner: 4 + 5 + `jq '.orderedItems[] | select(.type == "Create") | .object.tag | map(select(.type == "Mention")) | select(any) | .[].name' -r outbox.json | sort | uniq -c | sort -n` 6 + 7 + The output will be in the usual `uniq -c` format of `count item`, so how many times you've mentioned someone, then their username, 8 + sorted by count ascending (so your most "popular" accounts last). 9 + 10 + You can substitute `.name` in the jq filter for `.href` and get profile URLs instead of usernames. 11 + Swap out `.type == "Mention"` for `.type == "Hashtag"` and get a list of the hashtags you've used. 12 + Or pipe all of that into `wc -l` to see how many distinct accounts you've mentioned. 13 + 14 + I have no idea if this works on anything other than Mastodon, lmao. 15 + 16 + ## why? 17 + 18 + I love cool statistics. I've been active on the Fediverse for three years at the time of writing, 19 + so this produced very accurate data of who I usually interact with, kind of like that fedicircle thing. 20 + 21 + Also because over those three years I've managed to amass some, oh, 1000 followers and follows each. 22 + (I used to follow back a _lot_ early on.) 23 + 24 + As it turns out, the timeline gets Very crowded, and to me, annoying, with those counts. Yay no algorithm. 25 + And despite being seemingly very famous, I have never really heard from most of these people in any way, or interacted 26 + with them, for that matter. A lot of these accounts just ended up dying. 27 + 28 + So I wanted to unfollow _most_ people from my list (and remove most of my followers), while also keeping my friends, 29 + the people I do actually interact with. Preferrably without initiating a denial--of--service attack on my instance. 30 + 31 + I thought about seeing how many likes my posts have gotten from different accounts, but that would require database 32 + access (which I don't have). 33 + 34 + Likes "given" to others are also out, as the `likes.json` file in the export only lists post URLs, so I'd need to query 35 + my instance a zillion times to see who each post belongs to. Suboptimal. 36 + 37 + Then I had an idea to just count how many times I've replied to different accounts. This is much simpler, as usually 38 + (not always, but usually is good enough here) posts in a reply chain will have all the users in the chain listed as 39 + mentions, and those replies are just there in the `outbox.json` file. I didn't even have to parse the post text, the 40 + format just has all the mentions for a given post neatly listed (with the used hashtags too). 41 + Then it's just a matter of writing a... kind of long jq filter and piping it into the usual sort | uniq -c | sort. 42 + 43 + TL;DR I just made a new account, and this ended up being only somewhat useful to check if I had forgotten about someone. 44 + Still, pretty data.
+7
src/blog/2025-09-16-mastodon-stats/meta.json
··· 1 + { 2 + "title": "see how many times you've talked with someone on the fediverse", 3 + "lang": "en", 4 + "date": "2025-09-16", 5 + "tags": ["software", "short"], 6 + "keywords": ["mastodon", "fediverse", "statistics"] 7 + }
+1 -1
src/blog/template_index.html
··· 20 20 <main> 21 21 <header> 22 22 <h1>blog index</h1> 23 - <p>posts & things & various ramblings, probably</p> 23 + <p>posts & things & projects & various ramblings, probably</p> 24 24 </header> 25 25 <ul> 26 26 <!--BEGIN TEMPLATE-->
+1
src/blog/template_page.html
··· 9 9 <style> 10 10 main { 11 11 max-width: 50rem; 12 + text-align: justify; 12 13 } 13 14 </style> 14 15 $if(highlighting-css)$
+4
src/index.html
··· 107 107 <span>file dumpster</span> 108 108 <span>files.eeep.ee</span> 109 109 </a></li> 110 + <li><a href="blog/"> 111 + <span>"blog"</span> 112 + <span>& rants & projects</span> 113 + </a></li> 110 114 </ul> 111 115 </main> 112 116 <footer>
+6 -3
src/style.css
··· 99 99 100 100 .tag { 101 101 /* intentional swap */ 102 - background-color: var(--color-fg); 103 - color: var(--color-bg); 102 + --fg: var(--color-bg); 103 + --bg: var(--color-fg); 104 + background-color: var(--bg); 105 + color: var(--fg); 104 106 font-size: 0.9em; 105 107 border-radius: 0.3rem; 106 108 padding: 0.2rem 0.4rem; 107 109 } 108 110 109 - .tag[data-tag="test"] { background-color: rgb(255, 112, 112); color: black; } 111 + .tag[data-tag='test'] { --bg: #f66151; --fg: #000; } 112 + .tag[data-tag='software'] { --bg: #8ff0a4; --fg: #000; } 110 113 111 114 pre { 112 115 padding: 1rem;