Audio (340) Datatype (50) Demo (203) Development (592) Document (22) Driver (100) Emulation (146) Game (984) Graphics (491) Library (112) Network (230) Office (65) Utility (907) Video (68)
Total files: 4310
Full index file Recent index file
Amigans.net OpenAmiga Aminet IntuitionBase
|
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 2022 | 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 | | | | Comments: | 21 | Snapshots: | 3 | Videos: | 0 | Downloads: | 80 (Current version) | | 581 (Accumulated) | Votes: | 1 (0/0) (30 days/7 days) | |
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.
|