OS4 DepotLogo by DBAlex 
(anonymous IP: 3.144.189.177,0) 
 HomeRecentStatsSearchMirrorsContactInfoDisclaimerConfigAdmin
 Menu

 Features
   Crashlogs
   Bug tracker
   Locale browser
 

 Categories

   o Audio (343)
   o Datatype (51)
   o Demo (203)
   o Development (596)
   o Document (22)
   o Driver (97)
   o Emulation (147)
   o Game (1004)
   o Graphics (497)
   o Library (115)
   o Network (232)
   o Office (66)
   o Utility (923)
   o Video (69)

Total files: 4365

Full index file
Recent index file

 Links

  Amigans.net
  OpenAmiga
  Aminet
  UtilityBase
  IntuitionBase
  AmigaBounty


Support the site


 Readme for:  Network » Misc » weather.lha

weather.py

Description: weather env vars for your titlebar
Download: weather.lha       (TIPS: Use the right click menu if your browser takes you back here all the time)
Size: 17kb
Version: 0.5
Date: 28 Aug 22
Author: Nick Clover
Submitter: djbase
Requirements: Optional: amigavars python module
Category: network/misc
Replaces: network/misc/weather.lha
License: Other
Distribute: yes
Min OS Version: 4.1
FileID: 12203
 
Snapshots:
 
Comments: 21
Snapshots: 3
Videos: 0
Downloads:  (Current version)
 (Accumulated)

[Show comments] [Show snapshots] [Show videos] [Show content] [Show crashlogs] 
weather.py by Nick Clover
Released as DWYWWI-Ware (do what you like with it)

This is my first attempt at writing a python script with a lot of help from
Andy Broad.

It basically grabs an rss feed from BBC weather and converts it to envvars
so you can display your local weather in the workbench or dopus5 titlebar.


Installation:

   Copy the script anywhere you want.


Configuration:

   You will need to edit the script to set your local area, to do this use
   odyssey to go to:

   http://www.bbc.co.uk/weather/

   Search for your local forcast. when the page has loaded copy the numbers
   at the end of the url eg.

   London is: http://www.bbc.co.uk/weather/2643743
   Copy 2643743

*Update V0.2*

   Open a shell and enter:

   SetENV Save weather.cfg 2643743

   If you prefer you can enter the complete rss url as the script will look for
   7 characters, if not found the entire envvar is passed without modification.
   This should allow you to use other servers but I can't guarantee that it
   will work as the format may be different.


Running the script:

   Edit your s:network-startup file and enter the following at the end.

   Run <>nil: <YourPath>weather.py


Env Vars:

   The following Env Vars are produced:

 w_locn - Name of locaction (UTF8 not supported)
 w_tmpb - temperature in both °C and °F
 w_tmpc - temperature in °C
 w_tmpf - temperature in °F
 w_wspd - wind speed
 w_wdrl - wind direction long format eg. North, South, East, West etc.
 w_wdrs - wind direction short version eg. N, E, W, S, NW, NNE, SSW etc
 w_hmid - humidity percentage
 w_prsr - air pressure in milibars
 w_prdl - air pressure direction long format, "Rising" or "Falling"
 w_prds - air pressure direction short format, "R" or "F"
 w_visl - visibility, long format
 w_viss - vilibility, short format

 E  = Excellent, VG = Very Good, G  = Good, M  = Moderate, P  = Poor,
 VP = Very Poor, N/A  = Not Available


History:

   V0.5 - The URL of the weather feed has changed. Fixed. (djbase)

   V0.4 - Fixed a bug in weather-amigavars.py that prevented it setting
          Rising or Falling air pressure and stopped the script updating.

   V0.3 - Added support for amigavars module by Andy Broad. Kept V0.2 in
          the archive in case you don't have it installed.

   V0.2 - Added SetENV configuration.
        - Added version string.
        - Now has two scripts, weather.py and waether-test.py.
          The test version runs once for testing your config.
        - Reformatted readme to under 80 characters wide.

   V0.1 - Initial release.





Copyright (c) 2004-2024 by Björn Hagström All Rights Reserved
Amiga OS and its logos are registered trademarks of Hyperion Entertainment