===============================================================================
  SM-WEATHER 1.1  -  Weather status bar and weather screen for your BBS
  by Captain Obvious, Shadowscope BBS (bbs.shadowscope.com)            11/2026
===============================================================================

  Puts a one-line weather bar on any menu, for example right above the
  menu prompt, and (new in 1.1) builds a full weather screen for your news
  menu.  The bar looks like:

    Springfield  58F Partly cloudy  Feels 55F  Hi/Lo 64/41  Wind 6 mph NW

  The idea comes from xqtr's article "Weather Status bar in your BBS"
  (Another Droid BBS, anotherdroidbbs.wordpress.com, 12/2023), which uses
  the Linux tool ansiweather.  ansiweather does not run on Windows and
  needs an OpenWeatherMap API key, so this is a small Python 3 script that
  does the same job anywhere:

    o Windows (32 or 64 bit), Linux, Raspberry Pi, macOS
    o Python 3 only - no packages to install
    o No account or API key: weather comes from Open-Meteo
      (https://open-meteo.com, free for non-commercial use)
    o Writes a display file with Mystic pipe colour codes, so the BBS just
      shows it like any other screen - no door, no delay for callers
    o Fits itself to the width you give it; colours, position and units
      are all set in the cfg
    o If the weather can't be fetched, the last good files stay up

  The weather screen (see weather-rpt.png) shows, on one 80x24 page:
    o Now: temperature, conditions, feels like, humidity, dew point, wind
      and gusts, pressure, cloud cover, visibility, UV index
    o Today: high / low, chance and amount of rain, sunrise, sunset and
      hours of daylight
    o The next 12 hours, every 2 hours: temperature, conditions, rain
    o 7 day forecast: high, low, conditions, chance of rain, wind
    o Temperatures coloured cold / mild / hot, your own colour scheme

-------------------------------------------------------------------------------
  FILES
-------------------------------------------------------------------------------
    sm-weather.py    the script
    sm-weather.cfg   settings - every option is explained inside
    readme.txt       this file
    weather-rpt.png  what the weather screen looks like (default colours)
    file_id.diz

-------------------------------------------------------------------------------
  INSTALL  (Mystic BBS - other BBS software: see the end)
-------------------------------------------------------------------------------
  1. Python 3 must be installed.  Check with:   python --version
     (on Linux it is usually  python3)

  2. Copy sm-weather.py and sm-weather.cfg to a folder, e.g.
       Windows:  c:\mystic\python\
       Linux:    /mystic/python/

  3. Edit sm-weather.cfg:
       name, lat, lon   your location (how to find lat/lon is in the cfg)
       units            f or c
       output           the theme text folder(s) to write weather.ans to

     Leave "output" empty for the first test, then run:
       python sm-weather.py
     You should see the bar (with pipe codes) printed.  Problems are
     written to sm-weather.log next to the script.

  4. Set "output", run it again and check that weather.ans was made.

  5. Keep it updated - pick one:
     o Add it to a batch file that runs at each login (Mystic: a menu
       command  D-  or  DE  in your login menu running the batch with
       "start" so callers don't wait), or
     o Mystic event (System Configuration > Event Editor) - a shell event
       every 30 minutes running:  python c:\mystic\python\sm-weather.py
     o Linux:  crontab -e  and add
         */30 * * * *  python3 /mystic/python/sm-weather.py
     Please don't run it more than every 15 minutes - Open-Meteo is free
     and the weather doesn't change that fast.

  6. Show it on a menu.  Mystic Configuration > Menu Editor, open the menu,
     add a menu item:
         Hotkey   : AFTER        (runs after the menu screen is drawn)
         Command  : GD  (Display file)
         Data     : weather

  7. The weather screen (optional): set "report" in the cfg to the file(s)
     to write - weather-rpt.ans in each theme's text folder - and run the
     script once.  Then add an item to your news (or any) menu:
         Hotkey   : W            (or whatever key you like)
         Text     : Weather Report
         Command  : GD  (Display file)
         Data     : weather-rpt
     If your menu uses its own ANSI screen, add the new item to it too.
     The screen ends with your pause prompt; set r_pause = no if the menu
     pauses on its own.  It's made by the same run as the bar - one
     download for both.

-------------------------------------------------------------------------------
  PUTTING IT IN THE RIGHT SPOT
-------------------------------------------------------------------------------
  row / col   where the bar is drawn.  For "just above the prompt", use the
              line above your menu prompt and the column the prompt starts
              in.  row = 0 draws it wherever the cursor happens to be.
  width       how many columns it may use, so it stays inside your
              screen's frame.  Items drop off the right end to fit:
              Humidity first, then Wind, Hi/Lo and Feels.
  bg          |16 = no background.  |17 = the blue status bar from xqtr's
              article; with a coloured bg the whole width is filled.

  Several themes?  List each theme's text folder in "output", separated
  by ;  (one run updates them all).  They all share the same row/col, so
  make a second cfg and run the script twice if your themes need different
  positions:   python sm-weather.py other.cfg

-------------------------------------------------------------------------------
  OTHER BBS SOFTWARE
-------------------------------------------------------------------------------
  The output is plain text with Mystic pipe codes (|07 colours, |[X |[Y
  positioning).  Software that understands pipe codes can display it as
  is.  For anything else, the Python is short and easy to change - the
  colours are built in one place near the end of the script.

-------------------------------------------------------------------------------
  HISTORY
-------------------------------------------------------------------------------
  1.1  11/2026  Full weather screen (report = ...), 12/24 hour clock
  1.0  11/2026  First release: status bar

-------------------------------------------------------------------------------
  CREDITS
-------------------------------------------------------------------------------
  xqtr / Another Droid BBS - the weather status bar idea
  Open-Meteo.com - free weather data (CC BY 4.0)

  Freeware.  Use it, change it, share it.  No warranty of any kind.
===============================================================================
