weathergrabber 0.0.4__py3-none-any.whl → 0.0.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- weathergrabber/adapter/client/weather_api.py +1 -1
- weathergrabber/cli.py +3 -1
- weathergrabber/domain/weather_icon_enum.py +3 -2
- weathergrabber/weathergrabber_application.py +1 -1
- {weathergrabber-0.0.4.dist-info → weathergrabber-0.0.6.dist-info}/METADATA +1 -1
- {weathergrabber-0.0.4.dist-info → weathergrabber-0.0.6.dist-info}/RECORD +10 -10
- {weathergrabber-0.0.4.dist-info → weathergrabber-0.0.6.dist-info}/WHEEL +0 -0
- {weathergrabber-0.0.4.dist-info → weathergrabber-0.0.6.dist-info}/entry_points.txt +0 -0
- {weathergrabber-0.0.4.dist-info → weathergrabber-0.0.6.dist-info}/licenses/LICENSE +0 -0
- {weathergrabber-0.0.4.dist-info → weathergrabber-0.0.6.dist-info}/top_level.txt +0 -0
|
@@ -14,7 +14,7 @@ class WeatherApi:
|
|
|
14
14
|
if location == None:
|
|
15
15
|
url = f"https://weather.com/{language}/weather/today"
|
|
16
16
|
elif len(location) < 64 :
|
|
17
|
-
raise ValueError("Invalid location")
|
|
17
|
+
raise ValueError("Invalid location id")
|
|
18
18
|
|
|
19
19
|
if language == None:
|
|
20
20
|
raise ValueError("language must be specified")
|
weathergrabber/cli.py
CHANGED
|
@@ -21,7 +21,9 @@ def main_cli():
|
|
|
21
21
|
|
|
22
22
|
# Check for language and location from environment variables if not provided as arguments
|
|
23
23
|
lang = args.lang if args.lang else os.getenv("LANG","en_US.UTF-8").split(".")[0].replace("_","-")
|
|
24
|
-
location_id = args.location_id
|
|
24
|
+
location_id = args.location_id
|
|
25
|
+
if not args.location_id and not args.location_name:
|
|
26
|
+
location_id = os.getenv('WEATHER_LOCATION_ID')
|
|
25
27
|
|
|
26
28
|
main(
|
|
27
29
|
log_level=args.log,
|
|
@@ -4,10 +4,11 @@ class WeatherIconEnum(Enum):
|
|
|
4
4
|
CLEAR = ('clear', chr(0xF0599), '☀️')
|
|
5
5
|
CLEAR_NIGHT = ('clear-night', chr(0xF0594), '🌙')
|
|
6
6
|
CLOUDY = ('cloudy', '\uf0c2', '☁️')
|
|
7
|
-
CLOUDY_FOGGY_DAY = ('cloudy-foggy-day',
|
|
8
|
-
CLOUDY_FOGGY_NIGHT = ('cloudy-foggy-night',
|
|
7
|
+
CLOUDY_FOGGY_DAY = ('cloudy-foggy-day', chr(0xF013), '🌥️')
|
|
8
|
+
CLOUDY_FOGGY_NIGHT = ('cloudy-foggy-night', chr(0xF013), '🌥️')
|
|
9
9
|
DAY = ('day', '\uf185', '🌞')
|
|
10
10
|
FEEL = ('feel', '\uf2c9', '🥵')
|
|
11
|
+
FOGGY = ('foggy', '\uf74e', '🌫️')
|
|
11
12
|
HUMIDITY = ('humidity', '\uf043', '💧')
|
|
12
13
|
MOSTLY_CLEAR_DAY = ('mostly-clear-day', chr(0xF0599), '☀️')
|
|
13
14
|
MOSTLY_CLEAR_NIGHT = ('mostly-clear-night', chr(0xF0594), '🌙')
|
|
@@ -72,7 +72,7 @@ class WeatherGrabberApplication:
|
|
|
72
72
|
self.logger.info("Keep open mode enabled, the application will refresh every 5 minutes")
|
|
73
73
|
while True:
|
|
74
74
|
self.controller.execute(params)
|
|
75
|
-
sleep(
|
|
75
|
+
sleep(1) # Sleep for 5 minutes
|
|
76
76
|
else:
|
|
77
77
|
self.controller.execute(params)
|
|
78
78
|
self.logger.info("WeatherGrabber Application finished")
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
weathergrabber/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
weathergrabber/cli.py,sha256=
|
|
2
|
+
weathergrabber/cli.py,sha256=QzBqR4N70W1bSfrSngQAL79vfY8_h8U8s5-LRzzesKo,1970
|
|
3
3
|
weathergrabber/core.py,sha256=TiZ2utmYKf9lkIXWv8YBfSdiHZXJZXuHS8B-dBDvevw,1138
|
|
4
|
-
weathergrabber/weathergrabber_application.py,sha256=
|
|
5
|
-
weathergrabber/adapter/client/weather_api.py,sha256=
|
|
4
|
+
weathergrabber/weathergrabber_application.py,sha256=2JfZAR94En3rmGrYKWRKxdRXmK_ikhJdgrGotFjtDys,3987
|
|
5
|
+
weathergrabber/adapter/client/weather_api.py,sha256=9S7JmXaAVvvPY60dz6rC3lx7X68BcqyvNzvSVM1-af8,963
|
|
6
6
|
weathergrabber/adapter/client/weather_search_api.py,sha256=1oy7JitHcmwkkhFlD0eIt5A7a4cGbf7LMNi26tR8z5o,1724
|
|
7
7
|
weathergrabber/adapter/tty/console_tty.py,sha256=B5BaAEqpP7aXIxzzBQv47qWcQFRSWo47tQ1Lxa9cbq0,4972
|
|
8
8
|
weathergrabber/adapter/tty/json_tty.py,sha256=ZRZSfVhFYsb8AXD1qjb1GBpaRMxHGNaMXW5VN8AvdaU,647
|
|
@@ -26,7 +26,7 @@ weathergrabber/domain/temperature_hight_low.py,sha256=PQOJ5uDtfMRBR5yMxXA46xuorJ
|
|
|
26
26
|
weathergrabber/domain/timestamp.py,sha256=tbUdTiWUf1mKhVq9SESeFGlu_sZ2FdmQCb1gr7u9I0c,1032
|
|
27
27
|
weathergrabber/domain/today_details.py,sha256=EUlV7xerYw5QhEsBfvO5m6-9Ghm4nPkXJz9zCmSYTbA,2398
|
|
28
28
|
weathergrabber/domain/uv_index.py,sha256=lNdk38Jq-A9msuzOLjIKrZIHUc2C9J8V4MA7HU3s1ZM,1420
|
|
29
|
-
weathergrabber/domain/weather_icon_enum.py,sha256=
|
|
29
|
+
weathergrabber/domain/weather_icon_enum.py,sha256=1nfWZmk8MCki5Dit-Exblpm0A1InxDldaoHxSgPfxP4,2360
|
|
30
30
|
weathergrabber/domain/wind.py,sha256=wTDz3X1rYsnw_eNoDi1miwaomxwhiJkY_q6xrdZtLak,789
|
|
31
31
|
weathergrabber/domain/adapter/icon_enum.py,sha256=YxGYS5vBRV2AiAfeuPOdqaQOHixAssiMbOzQnTmdSBg,84
|
|
32
32
|
weathergrabber/domain/adapter/output_enum.py,sha256=61iR10ppY8DNALPKV-vLnDQni5HxEzpoRNZbdBdRygk,117
|
|
@@ -63,9 +63,9 @@ weathergrabber/service/extract_today_details_service.py,sha256=QAwF7EzVaL1STGNDy
|
|
|
63
63
|
weathergrabber/service/read_weather_service.py,sha256=7_B8E9IN1KCwOhpuS5PfWazI1sCrDyYrZhkV2R38bhc,649
|
|
64
64
|
weathergrabber/service/search_location_service.py,sha256=tZmVgO45hjwoa4cl5bKPjMBmYlGxJiH_I9Ymb5pwEwU,1422
|
|
65
65
|
weathergrabber/usecase/use_case.py,sha256=wmNmJSiy0t00-KaxQqSryiu0keX0kI4PcLI2hBBHT_0,4460
|
|
66
|
-
weathergrabber-0.0.
|
|
67
|
-
weathergrabber-0.0.
|
|
68
|
-
weathergrabber-0.0.
|
|
69
|
-
weathergrabber-0.0.
|
|
70
|
-
weathergrabber-0.0.
|
|
71
|
-
weathergrabber-0.0.
|
|
66
|
+
weathergrabber-0.0.6.dist-info/licenses/LICENSE,sha256=X5JFljoqN43yFwpMLudQ9rtty4K_FeZfnz3v8Yhw23Q,1067
|
|
67
|
+
weathergrabber-0.0.6.dist-info/METADATA,sha256=4CewXY3qa4NaKuSZoX6GvC8oDWzrUJO9MPGERQVsqYk,5440
|
|
68
|
+
weathergrabber-0.0.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
69
|
+
weathergrabber-0.0.6.dist-info/entry_points.txt,sha256=m2P9a4mrJDTzuNaiTU438NA60GxCfaw7VKvruWw43N8,63
|
|
70
|
+
weathergrabber-0.0.6.dist-info/top_level.txt,sha256=P3NMDJJYRIvQujf994Vb4gZrobkKWkL2gh3NF_ajQWM,15
|
|
71
|
+
weathergrabber-0.0.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|