diff --git a/openweather.py b/openweather.py index be672a7..51cb783 100755 --- a/openweather.py +++ b/openweather.py @@ -24,11 +24,19 @@ if x["cod"] != "404": z = x["weather"] weather_description = z[0]["description"] + print() print(Columns([ - Panel(f"[bold]Temperature[/bold]\n[blue]{current_temperature} K", expand=True), - Panel(f"[bold]Atmospheric Pressure[/bold]\n[blue]{current_pressure} hPa", expand=True), - Panel(f"[bold]Humidity[/bold]\n[blue]{current_humidity} %", expand=True), - Panel(f"[bold]Description[/bold]\n[blue]{weather_description}", expand=True) + Panel(f"[blue]{round(current_temperature - 273.15, 2)}°C", + title="[bold]Temperature[/bold]"), + + Panel(f"[blue]{current_pressure}hPa", + title="[bold]Atmospheric Pressure[/bold]"), + + Panel(f"[blue]{current_humidity}%", + title="[bold]Humidity[/bold]"), + + Panel(f"[blue]{weather_description}", + title="[bold]Description[/bold]"), ])) else: