~mil/mobroute

c9b25594bc3dbfce558a90d2d856cd8a1269b2bb — Miles Alan 1 year, 4 months ago 3b17dff
Cleanup mepo script integrations
4 files changed, 17 insertions(+), 11 deletions(-)

M README.md
R scripts/{mepo_menu_mobroute.sh => mepo_menu_mobroute_directions.sh}
A scripts/mepo_menu_mobroute_stoptimes.sh
D scripts/mepo_menu_stoptimes.sh
M README.md => README.md +2 -1
@@ 115,7 115,8 @@ Until then, mobroute may still be integrated by performing the following:

This will install both the `mobroute` executable and a script
`mepo_menu_mobroute.sh` to /usr/local/bin. Once installed, launching
the central menu within mepo, you'll see new entries for `Route: via Mobroute`.
the central menu within mepo, you'll see new entries for `Route: via
Mobroute directions` and `Route: show Mobroute stoptimes on cursor`.

Do note, that by default Mobroute is configured to use NYC's subway
system GTFS file. This can be changed by [configuring a few variables

R scripts/mepo_menu_mobroute.sh => scripts/mepo_menu_mobroute_directions.sh +1 -1
@@ 1,5 1,5 @@
#!/usr/bin/env sh
DISPLAYNAME=" Route: via Mobroute"
DISPLAYNAME=" Route: via Mobroute directions"
[ -z "$MOBDBGTFSREGEX" ] && MOBDBGTFSREGEX="nyc_subway$"
[ -z "$MOBROUTEMEPODEBUG" ] && MOBROUTEMEPODEBUG="1"


A scripts/mepo_menu_mobroute_stoptimes.sh => scripts/mepo_menu_mobroute_stoptimes.sh +14 -0
@@ 0,0 1,14 @@
#!/usr/bin/env sh
DISPLAYNAME=" Route: show Mobroute stoptimes on cursor"
[ -z "$MOBDBGTFSREGEX" ] && MOBDBGTFSREGEX="nyc_subway$"
[ -z "$TERM" ] && TERM="foot"

"$TERM" sh -c "
  mobroute \
    -cmd stoptimes \
    -lat \"$MEPO_CURSOR_LAT\" \
    -lon \"$MEPO_CURSOR_LON\" \
    -gtfsregex \"$MOBDBGTFSREGEX\" \
  2> /tmp/mobroutedebug \
  | less -SR
"

D scripts/mepo_menu_stoptimes.sh => scripts/mepo_menu_stoptimes.sh +0 -9
@@ 1,9 0,0 @@
#!/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"