README - wu - Prints hourly forecast for the next 48 hours using api.wunderground.com
(HTM) hg clone https://bitbucket.org/iamleot/wu
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
README
---
1 wu is a shell one-liner^W script that prints hourly forecast for the next 48
2 hours using api.wunderground.com.
3
4 The output is a TSV (tab-separated values) with 4 fields, in the following
5 order (to add an header to print them please pass the `-h` option to wu):
6
7 - hour
8 - temperature in °C
9 - condition
10 - probability of precipitation
11
12 An API key and city are needed and are passed to `wu` respectively
13 via WU_APIKEY and WU_CITY environment variables, e.g.:
14
15 % date
16 Mon Jan 8 01:40:47 CET 2018
17 % env WU_APIKEY=XXXXXXXXXXXXXXXX WU_CITY=IT/Rome wu -h
18 Hour °C Condition Probability of precipitation
19 02 16 Clear 0
20 03 15 Clear 0
21 04 15 Partly Cloudy 0
22 05 14 Partly Cloudy 0
23 06 14 Partly Cloudy 0
24 07 14 Partly Cloudy 1
25 08 14 Partly Cloudy 1
26 09 15 Partly Cloudy 1
27 10 16 Partly Cloudy 1
28 11 17 Partly Cloudy 0
29 12 18 Mostly Cloudy 0
30 13 19 Mostly Cloudy 0
31 14 19 Mostly Cloudy 0
32 15 19 Mostly Cloudy 0
33 16 18 Overcast 1
34 17 17 Mostly Cloudy 1
35 18 17 Mostly Cloudy 1
36 19 16 Mostly Cloudy 7
37 20 16 Mostly Cloudy 13
38 21 16 Overcast 15
39 22 16 Overcast 21
40 23 16 Overcast 24
41 00 16 Mostly Cloudy 24
42 01 15 Mostly Cloudy 7
43 02 14 Mostly Cloudy 11
44 03 14 Overcast 15
45 04 14 Overcast 14
46 05 14 Overcast 17
47 06 14 Overcast 18
48 07 14 Overcast 13
49 08 13 Overcast 9
50 09 14 Overcast 24
51 10 14 Chance of Rain 37
52 11 16 Chance of Rain 38
53 12 16 Chance of Rain 44
54 13 16 Chance of Rain 53
55
56 To use `wu` `curl` and `jq` are needed.