+ weather header
This commit is contained in:
parent
8c02790666
commit
307446e596
1 changed files with 2 additions and 1 deletions
|
@ -23,6 +23,7 @@ class ungleichWeather(object):
|
||||||
|
|
||||||
def forecast_weather(args):
|
def forecast_weather(args):
|
||||||
_city, _country_code = get_loc()
|
_city, _country_code = get_loc()
|
||||||
|
print("Weather for {}\n".format(_city))
|
||||||
|
|
||||||
client = ApixuClient("cc33a1e3237a4b78b3174104190206")
|
client = ApixuClient("cc33a1e3237a4b78b3174104190206")
|
||||||
|
|
||||||
|
@ -30,4 +31,4 @@ class ungleichWeather(object):
|
||||||
print(f"{'Date':^12}|{'Min Temp':^10}|{'Max Temp':^10}|{'Condition':^15}")
|
print(f"{'Date':^12}|{'Min Temp':^10}|{'Max Temp':^10}|{'Condition':^15}")
|
||||||
print(f"{'*'*47:^47}")
|
print(f"{'*'*47:^47}")
|
||||||
for day in forecast['forecast']['forecastday']:
|
for day in forecast['forecast']['forecastday']:
|
||||||
print(f"{day['date']:^12}|{day['day']['mintemp_c']:^10}|{day['day']['maxtemp_c']:^10}|{day['day']['condition']['text']:^15}")
|
print(f"{day['date']:^12}|{day['day']['mintemp_c']:^10}|{day['day']['maxtemp_c']:^10}|{day['day']['condition']['text']:^15}")
|
||||||
|
|
Loading…
Reference in a new issue