@deadsuperhero There's some documentation about it here, and yeah, it looks like it can be turned into a config value fairly easily.


https://github.com/bonfire-networks/bonfire_geolocate

1

Adding the Weather Widget to your Bonfire Profile

As a demonstration of how widgets can be utilized, Bonfire offers a weather widget that can be enabled on profiles.


To get started, the administrator of the instance will need to get a weather API key from one of two providers:


  • openweathermap.org (Free tier with limited calls)
  • pirateweather.net (Free, OpenSource)

At the time of this blog post, Pirate Weather didn't seem to be allowing new subscriptions, but I'd check back.

Once you have the API key, you'll need to add an environment variable to your instance to enable the widget.


For Open Weather
OPEN_WEATHER_MAP_API_KEY=XYZ123


For Pirate Weather
PIRATE_WEATHER_API=XYZ123

UPDATE: Soon, Open Weather will be replaced by open-meteo.com and opensource API that does not require tokens to use

Restart your instance and then test the changes.

First you'll need to find the exact location text to use to get the weather you want. You can do so by using this OpenStreet map.


  • nominatim.openstreetmap.org

For example, I decided "Austin, TX" was close enough. I could also have tried my exact address, but note that whatever you enter will appear on your profile.


Go to your profile, and click the Gear icon near your banner and avatar.


Enter the location you chose from the OpenStreet map in the Location field.


Click enable weather widget.


Click Save.


Enjoy your weather widget!

@spark464 This is really really good, but it doesn't look like there's an option for Fahrenheit or Celsius?


This seems like the kind of low-hanging fruit that could make a demo widget like Weather really useful for developers.

2

@spark464 Right on. I know that they don't have MastoAPI at the moment, and understand their reasoning. It would just be really nice to have a proper mobile client!

1

@deadsuperhero Mastodon apps don't work as far as I know. Just this week I updated to the latest version and there's some nice UI changes to the site as a whole. "Get latest replies" works, love that feature.

bonfire logo

2