def main(mode): data = get_restaurants() weather = forecast.get(data['forecast_url'].encode('utf-8')) # mode if mode == 'suggestions': say.say('Här kommer några förslag:') for item in data['restaurants']: read_restaurant_menu(item, mode, data['prefered']) return elif mode == 'weather': say_weather(weather) return # intro say_intro() # get restaurants for item in data['restaurants']: read_restaurant_menu(item, mode, None) # say weather say_weather(weather) # Tuesday message if scraper.get_today_as_string() == 'Tisdag': say.say(OUTRO_SPECIAL)
def say_intro(): time_now = str(datetime.datetime.now().time())[:5] # intro day_now = scraper.get_today_as_string() intro = INTRO.format(day_now, time_now) say.say(intro)