Tweak output

This commit is contained in:
Marius Alwan Meyer 2023-09-29 13:05:54 +02:00
parent 7e55524287
commit 03f0f541d4

View File

@ -24,11 +24,19 @@ if x["cod"] != "404":
z = x["weather"] z = x["weather"]
weather_description = z[0]["description"] weather_description = z[0]["description"]
print()
print(Columns([ print(Columns([
Panel(f"[bold]Temperature[/bold]\n[blue]{current_temperature} K", expand=True), Panel(f"[blue]{round(current_temperature - 273.15, 2)}°C",
Panel(f"[bold]Atmospheric Pressure[/bold]\n[blue]{current_pressure} hPa", expand=True), title="[bold]Temperature[/bold]"),
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]{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: else: