Published July 24, 2025 | https://doi.org/10.59350/ad1s9-yzs02

Making a Panoramax Mastodon Bot

Feature image

a view from a road on a rocky bare mountain plateau, in the distance snowcapped peaks and a mountain lake

tl;dr: I made a Mastodon Bot that posts updated statistics for the Panoramax federation alongside randomly selected images once a day.

Since posting about Panoramax about a year ago, I've been an active contributor, uploading around 530,969 360° images taken during trips in Europe and here in Argentina. So, when @mfuhrmann asked in one of the Panoramax chats whether there was any Mastodon bot that regularly posted updates – similar to the MapComplete Edits bot – I was immediately "nerd-sniped".

Not only do I care about Panoramax and spreading the gospel of it, there's also few (coding) things I enjoy more than hacking together some software glue to make web services talk to each other. And at least half of the equation seemed like something not too hard to do, as I already did some work with the Mastodon API for my little web app that converts the most popular links of one's Mastodon timeline into an RSS feed. But the other half would be a fun learning opportunity.

So far, I had mostly used the existing Panoramax CLI interface for pushing images into the federation, but never used the API to actually request any images. Luckily, both the Meta catalog – which lists the existing instances – as well as the individual instances (e.g. OSM.fr) are quite well documented. So getting a prototype of querying for recent images and the statistics wasn't too bad.

For the actual bot, I thought it would be nice if it would post once a day, providing updated statistics for the whole federation but also each constituent server, posting about new images and contributors. Thanks to some helpful feedback by Thibaultmol, I set up the daily threads to unlist the posts for each individual instance, to not spam the local Mastodon server timeline. Similarly, the Panoramax-instance-specific posts are only triggered when the server has a change in statistics, to not post too many identical posts.

And of course, the bot should also show off some of the new images from each instance. Which brought the question of what to show off as alt-text for the images. In the first iteration I went with just restating that it's a Panoramax image, who contributed it and under which license it is. While I guess that's better than nothing, it's not very helpful either. And for obvious reasons, I don't want to legitimize any "AI" use, so that route wasn't an option either.

What I decided to try for the alt-texts instead, is to make use of the existing data in OpenStreetMap: As each image by its very nature is geo-located, it's possible to see which annotations are at this point in OSM, for example: what's the type of landuse, is there any annotated nature, what amenities or shops are nearby? And also: where was the photo taken, e.g. the name of the city and country.

To grab those local OSM objects, I took to learning at least some basics of the Overpass API, to extract nearby objects, but also areas/relations that surround the location of the image (e.g. to get landuse/nature annotations). I can then filter for keys/tags of interest, and ultimately create an alt-text that includes bits like this:

This picture was taken in Orange, France. According to OpenStreetMap, the following things are in a 25.0 meter radius of where the picture was taken:

  • Items tagged as 'landuse': grass, education
  • Items tagged as 'leisure': garden
  • Items tagged as 'natural': tree
  • Items tagged as 'amenity': school

If you are using or depending on alt-text, I'd love to hear from you to know if this is useful or not! And, if you want to see the bot in action, you can follow it at @PanoramaxContribs@en.osm.town. Lastly, if you have ideas how to improve it, it is on Codeberg as free software where you can open issues and PRs!

Additional details

Description

tl;dr: I made a Mastodon Bot that posts updated statistics for the Panoramax federation alongside randomly selected images once a day. Since posting about Panoramax about a year ago, I've been an active contributor, uploading around 530,969 360° images taken during trips in Europe and here in Argentina.

Identifiers

UUID
980acb62-ccfa-470a-98f2-32dba7f47ec2
GUID
https://doi.org/10.59350/yb098-wm38
URL
https://tzovar.as/panoramax-bot/

Dates

Issued
2025-07-24T10:26:00
Updated
2025-07-24T10:26:00