---
scripts/mepo_menu_stoptimes.sh | 9 +++++++++
1 file changed, 9 insertions(+)
create mode 100755 scripts/mepo_menu_stoptimes.sh
diff --git a/scripts/mepo_menu_stoptimes.sh b/scripts/mepo_menu_stoptimes.sh
new file mode 100755
index 0000000..488b721
--- /dev/null
@@ -0,0 +1,9 @@
+#!/usr/bin/env sh
+DISPLAYNAME=" Mobroute: show stoptimes on cursor"
+
+[ -z "$MOBDBGTFSREGEX" ] && MOBDBGTFSREGEX="nyc_subway$"
+[ -z "$TERM" ] && TERM="foot"
+
+mobroute -cmd stoptimes -lat "$MEPO_CURSOR_LAT" -lon "$MEPO_CURSOR_LON" -gtfsregex "$MOBDBGTFSREGEX" > /tmp/mob
+
+"$TERM" sh -c "less -SR /tmp/mob"
--
2.40.1
On Sat, May 27, 2023, at 1:57 AM, Anjandev Momi wrote:
> ---
> scripts/mepo_menu_stoptimes.sh | 9 +++++++++
> 1 file changed, 9 insertions(+)
> create mode 100755 scripts/mepo_menu_stoptimes.sh
>
> diff --git a/scripts/mepo_menu_stoptimes.sh
> b/scripts/mepo_menu_stoptimes.sh
> new file mode 100755
> index 0000000..488b721
> --- /dev/null
> +++ b/scripts/mepo_menu_stoptimes.sh
> @@ -0,0 +1,9 @@
> +#!/usr/bin/env sh
> +DISPLAYNAME=" Mobroute: show stoptimes on cursor"
> +
> +[ -z "$MOBDBGTFSREGEX" ] && MOBDBGTFSREGEX="nyc_subway$"
> +[ -z "$TERM" ] && TERM="foot"
> +
> +mobroute -cmd stoptimes -lat "$MEPO_CURSOR_LAT" -lon
> "$MEPO_CURSOR_LON" -gtfsregex "$MOBDBGTFSREGEX" > /tmp/mob
> +
> +"$TERM" sh -c "less -SR /tmp/mob"
> --
> 2.40.1
Thanks! Applied with some small fixups.
I think eventually would be nice to have this script just output mepolang
rather then open a separate window. That way stoptimes appear as part of a
pin's metadata in the UI - and frees the user from configuring $TERM.
Opened ticket for this:
https://todo.sr.ht/~mil/mobroute-tickets/5