Commit graph

23 commits

Author SHA1 Message Date
CPrompt
0a04552935 Adding the option to show the high and low temperature 2019-12-24 07:50:18 -05:00
Tobias Witek
621564d247 [core] Switch update interval parameter to seconds
As correctly pointed out by @rrhuffy, restricting update intervals to
minutes is pretty arbitrary. Therefore, change logic to specify updates
intervals in *seconds*.

Also, to maintain backwards compatibility for users that already have
custom intervals in their config, allow a module to specify their own
"factor" for intervals. So a module that expects the interval to be in
minutes can set the factor to 60.
2019-10-29 20:20:19 +01:00
Tobias Witek
a1a339bcb7 [modules/weather] Fix exception if requests is not installed
fixes #418
2019-08-11 07:17:22 +02:00
david-perez
8bb67642fd Add support for city ids to weather module.
Some cities (e.g. in different countries) have the same names. Providing a city
name to the weather module would previously display the first returned result by openweathermap's API.
This commit allows city ids to be provided to the weather module. If a location passed
to the weather module only contains numbers, it will be interpreted as a city id.
City ids are those handled by openweathermap's API to uniquely identify cities.

See https://openweathermap.org/current#cityid for details.
2019-05-20 19:10:39 +01:00
Tobias Witek
451e3e48e5 [modules/weather] Fix location display for "auto"
When "auto" is used, the location was never shown.

Also, document the "showcity" parameter.

fixes #360
2019-02-11 20:07:10 +01:00
Tobias Witek
bb65c1cd68 [modules/location] Enable location switching
If multiple locations are provided as comma-separated list, left-click
and right-click can be used to circulate through them.

NOTE: Every click produced a new request to the weather reporting
service!

see #360
2019-02-09 13:10:35 +01:00
Alex
f021250e41 Using util function for boolean param 2018-11-02 10:04:43 +01:00
Alex
19e6abc8ca Added option to disable city display 2018-11-01 22:15:00 +01:00
Frederic Junod
6df041754c [module/weather] Use json function from requests response
Instead of using the json library
2018-10-31 16:26:47 +01:00
Tobias Witek
3638aa2420 [modules/various] Use new interval mechanism
Use generic interval mechanism in most of the modules that use slow
updates.

Only exception: getcrypto, as the interval is specified in seconds there
and I want to retain backwards-compatibility.

fixes #220
2018-01-07 20:27:11 +01:00
Frederic Junod
70a58715f3 Fix unused-variables errors found by pylint 2017-10-18 08:36:07 +02:00
Frederic Junod
57204a215e Fix bad-whitespace errors found by pylint 2017-10-17 18:59:23 +02:00
Pavle Portic
c462bd3472 [modules/weather] Show city in weather module 2017-09-29 14:31:42 +02:00
Justin Wheeler
29f3e7b515 Add weather icons.
Add icons to the weather output to show condition to go with current
temperature.
2017-06-12 22:26:33 -04:00
Tobias Witek
dc06611fb1 [modules] weather & github: Protect against missing data
If data cannot be retrieved for some reason (be pretty generous about
that by catching generic exceptions), instead of terminating the whole
status bar, simply report unknown data.

see #110
2017-06-10 13:59:44 +02:00
Tobias Witek
11235d6883 [modules/weather] Set indicator to "?" when data is invalid
If retrieving weather information fails, replace the temperature data
with a "?".

fixes #60
2017-04-01 16:53:39 +02:00
Michal Siedlaczek
d826e250c8 Catch RequestException when fetching weather 2017-04-01 09:23:32 -04:00
Chris LaRose
fe11bad826 Silence ImportErrors for optional dependencies. Fixes #55. 2017-03-25 18:35:56 -07:00
Tobi-wan Kenobi
ec19f48853 [modules/weather] Remove remaining timer references
Remove obsolete _timer references.
2017-02-26 15:30:07 +01:00
Pavle Portic
44aa1bc564 [modules/weather] Add API key parameter documentation and round temperature to int 2017-02-26 14:17:26 +01:00
Tobi-wan Kenobi
8dc07e666e [modules/weather] Replace urllib with requests
Since requests works the same for python2.7 and python3.x, use requests
instead of urllib (which returns a string in python2.7, but byte data in
python3.0, at least).
2017-02-26 08:19:30 +01:00
Tobi-wan Kenobi
feb5719ecc [modules/weather] Minor reworks
* Use app-specific API key for bumblebee-status
* Add some parameters (location, unit, update interval)
* Make interval calculation based on time, not number of calls
2017-02-26 08:07:58 +01:00
Pavle Portic
49af9c14d6 [modules/weather] Add rudimentary weather module 2017-02-26 02:42:27 +01:00