Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Notify when the train is approaching

Defaults to leaving from Gland. PRs welcome.

Requirements

Install jq

Arguments

train_times
	-d		[D]eparture station (without flag this defaults to Gland)
	-a		[A]rrival station
	-n		prior [N]otification time in minutes
	-w		[W]alk time to platform in minutes
	-t		alert [T]ype (window manager or terminal)
				- gnome
				- i3
				- console

Crontab example

	*/3 16-23 * * 1-5 /PATH/TO/SCRIPT/train_times.sh -a Lausanne -n 20 -w 10 -t gnome

Bash alias example

	alias trains='/PATH/TO/SCRIPT/train_times.sh -a Lausanne -n 20 -w 10 -t debug'

Misc

Check the board JSON for the destination station names that need passed as an argument http://transport.opendata.ch/v1/stationboard?station=gland&transportations=train&limit=4

Special chars may need escaped. Not tested.

About

Simple script to display when trains are arriving nearby

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages