~mil/mepo-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH mobroute v2] add script to show stop times on cursor

Details
Message ID
<20230527055723.19650-1-anjan@momi.ca>
DKIM signature
missing
Download raw message
Patch: +9 -0
---
 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
Details
Message ID
<bb0bab2a-a7f7-48af-977a-87612898bf8b@app.fastmail.com>
In-Reply-To
<20230527055723.19650-1-anjan@momi.ca> (view parent)
DKIM signature
missing
Download raw message
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
Reply to thread Export thread (mbox)