kellya / maubot-weather

This is a maubot plugin that uses wttr.in to get a simple representation of the weather
MIT License
16 stars 5 forks source link

build status latest Release Latest in dev

weather

A simple maubot (which was based on the echobot) that gets the weather from wttr.in and returns the text to the chat

Usage

Units

The unit is directly passed to the wttr.in, so the option specified must match what wttr.in expects.

Valid units are as follows:

(taken from https://github.com/chubin/wttr.in)

Examples

!weather

Entering !weather in the chat will display the default server location setting and display the single-line version of the weather from wttr.in.

oneline

If the show_image setting is true in the settings, the bot will return the png image of the current weather with the forecast

image_weather_oneline

!moon

Entering the !moon command in the chat will display a oneline version of the lunar phase:

image_moon

Installation

  1. Download the current com.arachnitech.weather-vX.Y.Z.mbp file from the Releases page.
  2. Follow the Maubot instructions which boils down to:

    1. In your maubot manager, click the plus sign next to plugins
    2. Upload the plugin you downloaded from step 1 above

Upgrading

Basically the same as the Installation, except since you already have it installed:

  1. Click on the com.arachnitech.weather under the plugins
  2. Upload the new version

Development

If you would like to mess with the source code to add your own stuff, or clean up some python atrocity I have committed, please clone/fork this repo and have at it.

I have built everything using poetry, so the easiest path is:

  1. clone/fork the repo
  2. run poetry shell
  3. run poetry install to add all the dependent packages
  4. Make changes.

Chat

chat

I have created a dedicated #maubot-weather:arachnitech.com channel. I also follow the #maubot:maubot.xyz channel.