-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
69 lines (45 loc) · 2.01 KB
/
README
File metadata and controls
69 lines (45 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
owm.sh is a bash script to automatically download and parse OpenWeatherMap current weather and hourly forecast.
Then you can use it with conky to display your meteo on your desktop.
http://openweathermap.org/
https://github.com/brndnmtthws/conky
DEPENDENCIES
This bash script requires:
* curl
* jq
* bc
* diff
* gnuplot if you activate barograph
INSTALL
Copy owm directory into your .conky directory and be sure to chmod u+x owm.sh and plot.sh
BEFORE USING
Find your location id and register on OpenWeatherMap website to get an API key.
https://openweathermap.org/find?q=
API Key: see https://openweathermap.org/appid
Then fill the settings at the begining of the script.
You can edit lang, units, nb days forecast, choose time (forecast is hourly)
USE
owm.sh [-a] [-b] [-c] [-f] [-h] [-t <theme dir>]
Options:
-a download and parse all. (current condition and hourly forecast)
-b activate barograph. Can be defined in the settings.
-c download and parse current weather only.
-f download and parse forecasts only.
-h this help.
-t <theme dir> define the theme directory to use for icons. Can be defined in the settings.
You have my 2 french conky scripts as examples in the owm directory : owm-conkyrc & owmbaro-conkyrc
Launch owm.sh -a one time before launching conky or you won't have any data to display
and you will have to wait the conky refesh.
Example:
~/.conky/owm/owm.sh -a
Then conky -c ~/.conky/owm/owm-conkyrc
Limits with free api key:
Do not send requests more than 1 time per 10 minutes from one device/one API key.
Normally the weather is not changing so frequently.
If you do more, your api key can be blocked.
Barograph:
If you activate barograph, I recommand a 24/24 online pc and prefer a crontab to regularly launch owm.sh
Remove "${texeci 600 bash $HOME/.conky/owm/owm.sh -a" from your conky script.
Then crontab -e
*/10 * * * * /home/user/.conky/owm/owm.sh -a > /dev/null # owm every 10mn
Have fun
(forgive my english)