From 9c551d37a004e7ce2fec7367c282c47623b11956 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Tue, 9 Jan 2018 11:01:49 -0600 Subject: [PATCH] weather: use ** for bold rather than irc codes --- weather/lib.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/weather/lib.py b/weather/lib.py index 8b558cc..27909a5 100644 --- a/weather/lib.py +++ b/weather/lib.py @@ -57,7 +57,7 @@ def get_conditions_for_query(queryitems): else: try: location = current['display_location']['full'] - reply = "Conditions for {0:s}: ".format(location) + reply = "Conditions for **{0:s}**: ".format(location) weather_str = current['weather'] if weather_str != '': @@ -85,35 +85,35 @@ def get_conditions_for_query(queryitems): humidity_str = current['relative_humidity'] if humidity_str != '': - reply += "Humidity: {0:s}. ".format(humidity_str) + reply += "**Humidity**: {0:s}. ".format(humidity_str) wind_str = current['wind_string'] if wind_str != '': - reply += "Wind: {0:s}. ".format(wind_str) + reply += "**Wind**: {0:s}. ".format(wind_str) pressure_in = current['pressure_in'] pressure_trend = current['pressure_trend'] if pressure_in != '': - reply += "Pressure: {0:s}\"".format(pressure_in) + reply += "**Pressure**: {0:s}\"".format(pressure_in) if pressure_trend != '': reply += " and {0:s}".format("dropping" if pressure_trend == '-' else "rising") reply += ". " heat_index_str = current['heat_index_string'] if heat_index_str != '' and heat_index_str != 'NA': - reply += "Heat index: {0:s}. ".format(heat_index_str) + reply += "**Heat index**: {0:s}. ".format(heat_index_str) windchill_str = current['windchill_string'] if windchill_str != '' and windchill_str != 'NA': - reply += "Wind chill: {0:s}. ".format(windchill_str) + reply += "**Wind chill**: {0:s}. ".format(windchill_str) visibility_mi = current['visibility_mi'] if visibility_mi != '': - reply += "Visibility: {0:s} miles. ".format(visibility_mi) + reply += "**Visibility**: {0:s} miles. ".format(visibility_mi) precip_in = current['precip_today_in'] if precip_in != '': - reply += "Precipitation today: {0:s}\". ".format(precip_in) + reply += "**Precipitation today**: {0:s}\". ".format(precip_in) observation_time = current['observation_time'] if observation_time != '': @@ -174,7 +174,7 @@ def get_forecast_for_query(queryitems): try: reply = "Forecast: " for forecast in forecasts['forecastday'][0:5]: - reply += "{0:s}: {1:s} ".format(forecast['title'], + reply += "**{0:s}**: {1:s} ".format(forecast['title'], forecast['fcttext']) return _prettify_weather_strings(reply.rstrip())