Skip to content

Simple script to display when trains are arriving nearby

Notifications You must be signed in to change notification settings

darcyrush/iliketrains

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

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

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages