|
|
|
@ -85,11 +85,16 @@ def pprint_delta(delta): |
|
|
|
return ret |
|
|
|
|
|
|
|
|
|
|
|
config = """\ |
|
|
|
text_config = """\ |
|
|
|
{route} - {end} ({direction}) |
|
|
|
{nm}, stop {stop_id} |
|
|
|
{delta} ({t})\ |
|
|
|
""" |
|
|
|
notification_config = """\ |
|
|
|
{direction} |
|
|
|
{nm}, stop {stop_id} |
|
|
|
{delta} ({t})\ |
|
|
|
""" |
|
|
|
|
|
|
|
|
|
|
|
def show( |
|
|
|
@ -116,11 +121,11 @@ def show( |
|
|
|
"end": bustime["des"], |
|
|
|
"nm": bustime["stpnm"].rstrip(), |
|
|
|
} |
|
|
|
text_to_show = config.format(**format_dict) |
|
|
|
text_to_show = text_config.format(**format_dict) |
|
|
|
if do_gui and enable_notifications: |
|
|
|
notification_module.nm.setup_exiter(EXIT) |
|
|
|
notification_module.nm.set_title("Bustimes") |
|
|
|
notification_module.nm.say(text_to_show) |
|
|
|
notification_module.nm.set_title("{route} - {end}".format(**format_dict)) |
|
|
|
notification_module.nm.say(notification_config.format(**format_dict)) |
|
|
|
|
|
|
|
if do_gui and enable_toast: |
|
|
|
toast(text_to_show) |
|
|
|
|