weathergrabber 0.0.7a1__py3-none-any.whl → 0.0.7a3__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/__init__.py +7 -0
- weathergrabber/__main__.py +4 -0
- weathergrabber/cli.py +1 -1
- weathergrabber/domain/weather_icon_enum.py +1 -0
- weathergrabber/usecase/use_case.py +2 -0
- {weathergrabber-0.0.7a1.dist-info → weathergrabber-0.0.7a3.dist-info}/METADATA +19 -5
- {weathergrabber-0.0.7a1.dist-info → weathergrabber-0.0.7a3.dist-info}/RECORD +11 -10
- {weathergrabber-0.0.7a1.dist-info → weathergrabber-0.0.7a3.dist-info}/WHEEL +0 -0
- {weathergrabber-0.0.7a1.dist-info → weathergrabber-0.0.7a3.dist-info}/entry_points.txt +0 -0
- {weathergrabber-0.0.7a1.dist-info → weathergrabber-0.0.7a3.dist-info}/licenses/LICENSE +0 -0
- {weathergrabber-0.0.7a1.dist-info → weathergrabber-0.0.7a3.dist-info}/top_level.txt +0 -0
weathergrabber/__init__.py
CHANGED
weathergrabber/cli.py
CHANGED
|
@@ -7,6 +7,7 @@ class WeatherIconEnum(Enum):
|
|
|
7
7
|
CLOUDY_FOGGY_DAY = ('cloudy-foggy-day', chr(0xF013), '🌥️')
|
|
8
8
|
CLOUDY_FOGGY_NIGHT = ('cloudy-foggy-night', chr(0xF013), '🌥️')
|
|
9
9
|
DAY = ('day', '\uf185', '🌞')
|
|
10
|
+
DRIZZLE = ('drizzle', '\uf0e9', '🌦️')
|
|
10
11
|
FEEL = ('feel', '\uf2c9', '🥵')
|
|
11
12
|
FOGGY = ('foggy', '\uf74e', '🌫️')
|
|
12
13
|
HUMIDITY = ('humidity', '\uf043', '💧')
|
|
@@ -59,11 +59,13 @@ class UseCase:
|
|
|
59
59
|
try:
|
|
60
60
|
hourly_predictions = self.extract_hourly_forecast_service.execute(weather_data)
|
|
61
61
|
except ValueError:
|
|
62
|
+
self.logger.warning("Falling back to old style hourly forecast extraction")
|
|
62
63
|
hourly_predictions = self.extract_hourly_forecast_oldstyle_service.execute(weather_data)
|
|
63
64
|
|
|
64
65
|
try:
|
|
65
66
|
daily_predictions = self.extract_daily_forecast_service.execute(weather_data)
|
|
66
67
|
except ValueError:
|
|
68
|
+
self.logger.warning("Falling back to old style daily forecast extraction")
|
|
67
69
|
daily_predictions = self.extract_daily_forecast_oldstyle_service.execute(weather_data)
|
|
68
70
|
|
|
69
71
|
forecast = Forecast(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: weathergrabber
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.7a3
|
|
4
4
|
Summary: A grabber for weather.com data with various output formats.
|
|
5
5
|
Author-email: Carlos Anselmo Mendes Junior <cjuniorfox@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -140,7 +140,21 @@ weathergrabber [location_name] [options]
|
|
|
140
140
|
Or as a Python module:
|
|
141
141
|
|
|
142
142
|
```sh
|
|
143
|
-
python -m weathergrabber
|
|
143
|
+
python -m weathergrabber [location_name] [options]
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Importing as a Python module
|
|
147
|
+
|
|
148
|
+
You can also use the main API or CLI entry point in your own Python code:
|
|
149
|
+
|
|
150
|
+
```python
|
|
151
|
+
import weathergrabber
|
|
152
|
+
|
|
153
|
+
# Call the main API
|
|
154
|
+
weathergrabber.main(log_level="INFO", location_name="London", location_id="", lang="en-GB", output="console", keep_open=False, icons="emoji")
|
|
155
|
+
|
|
156
|
+
# Or run the CLI programmatically
|
|
157
|
+
weathergrabber.main_cli()
|
|
144
158
|
```
|
|
145
159
|
|
|
146
160
|
### Arguments
|
|
@@ -172,7 +186,7 @@ weathergrabber "Paris" -o waybar -i fa
|
|
|
172
186
|
Or as a Python module:
|
|
173
187
|
|
|
174
188
|
```sh
|
|
175
|
-
python -m weathergrabber
|
|
176
|
-
python -m weathergrabber
|
|
177
|
-
python -m weathergrabber
|
|
189
|
+
python -m weathergrabber "London" --output console --lang en-GB
|
|
190
|
+
python -m weathergrabber --location-id 1234567890abcdef... --output json
|
|
191
|
+
python -m weathergrabber "Paris" -o waybar -i fa
|
|
178
192
|
```
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
weathergrabber/__init__.py,sha256=
|
|
2
|
-
weathergrabber/
|
|
1
|
+
weathergrabber/__init__.py,sha256=ZIzvBQBCry-C_ieN_oSQpTYfFeUOOi-ymjYNNqje1uw,173
|
|
2
|
+
weathergrabber/__main__.py,sha256=K10wQv3-LSRD_FRLHWphdSs3OAcuzIb4sQaKmj7Fql0,105
|
|
3
|
+
weathergrabber/cli.py,sha256=YOWoVLfwktgqK1bp89GUKkAEKyMM4DaNL4akBi6xVVk,1979
|
|
3
4
|
weathergrabber/core.py,sha256=TiZ2utmYKf9lkIXWv8YBfSdiHZXJZXuHS8B-dBDvevw,1138
|
|
4
5
|
weathergrabber/weathergrabber_application.py,sha256=2JfZAR94En3rmGrYKWRKxdRXmK_ikhJdgrGotFjtDys,3987
|
|
5
6
|
weathergrabber/adapter/client/weather_api.py,sha256=9S7JmXaAVvvPY60dz6rC3lx7X68BcqyvNzvSVM1-af8,963
|
|
@@ -26,7 +27,7 @@ weathergrabber/domain/temperature_hight_low.py,sha256=PQOJ5uDtfMRBR5yMxXA46xuorJ
|
|
|
26
27
|
weathergrabber/domain/timestamp.py,sha256=Bk6f8Tx0-yNitYmEKIWHnqh_ALDwxEHrhoCRSrfvYTU,1222
|
|
27
28
|
weathergrabber/domain/today_details.py,sha256=EUlV7xerYw5QhEsBfvO5m6-9Ghm4nPkXJz9zCmSYTbA,2398
|
|
28
29
|
weathergrabber/domain/uv_index.py,sha256=lNdk38Jq-A9msuzOLjIKrZIHUc2C9J8V4MA7HU3s1ZM,1420
|
|
29
|
-
weathergrabber/domain/weather_icon_enum.py,sha256=
|
|
30
|
+
weathergrabber/domain/weather_icon_enum.py,sha256=tAaN6w9g3ZcwB5KLN5ivjO7Hp_C1tBynSkyxRQaChTI,2696
|
|
30
31
|
weathergrabber/domain/wind.py,sha256=wTDz3X1rYsnw_eNoDi1miwaomxwhiJkY_q6xrdZtLak,789
|
|
31
32
|
weathergrabber/domain/adapter/icon_enum.py,sha256=YxGYS5vBRV2AiAfeuPOdqaQOHixAssiMbOzQnTmdSBg,84
|
|
32
33
|
weathergrabber/domain/adapter/output_enum.py,sha256=61iR10ppY8DNALPKV-vLnDQni5HxEzpoRNZbdBdRygk,117
|
|
@@ -62,10 +63,10 @@ weathergrabber/service/extract_temperature_service.py,sha256=46nRO3Izj1QmG4BNTh8
|
|
|
62
63
|
weathergrabber/service/extract_today_details_service.py,sha256=QAwF7EzVaL1STGNDyxve9r7oQTjvNKhYQ53d_68lbKA,4126
|
|
63
64
|
weathergrabber/service/read_weather_service.py,sha256=7_B8E9IN1KCwOhpuS5PfWazI1sCrDyYrZhkV2R38bhc,649
|
|
64
65
|
weathergrabber/service/search_location_service.py,sha256=tZmVgO45hjwoa4cl5bKPjMBmYlGxJiH_I9Ymb5pwEwU,1422
|
|
65
|
-
weathergrabber/usecase/use_case.py,sha256=
|
|
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/usecase/use_case.py,sha256=K2RBIEi7S0ixAM6oDKmCPYkuJ9azatxle8zAqX0xM1E,4635
|
|
67
|
+
weathergrabber-0.0.7a3.dist-info/licenses/LICENSE,sha256=X5JFljoqN43yFwpMLudQ9rtty4K_FeZfnz3v8Yhw23Q,1067
|
|
68
|
+
weathergrabber-0.0.7a3.dist-info/METADATA,sha256=Kd20VH6xefuvSdWMLrxGRT7IBz-ob2WrVOdVDP11IT4,5796
|
|
69
|
+
weathergrabber-0.0.7a3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
70
|
+
weathergrabber-0.0.7a3.dist-info/entry_points.txt,sha256=m2P9a4mrJDTzuNaiTU438NA60GxCfaw7VKvruWw43N8,63
|
|
71
|
+
weathergrabber-0.0.7a3.dist-info/top_level.txt,sha256=P3NMDJJYRIvQujf994Vb4gZrobkKWkL2gh3NF_ajQWM,15
|
|
72
|
+
weathergrabber-0.0.7a3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|