Skip to content

CLI application to get upcoming tram/departures from a given tram stop in Gothenburg. Written in Rust.

Notifications You must be signed in to change notification settings

sandmanlukas/tram_checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tram-Checker

CLI application to get upcoming tram/departures from a given tram stop in Gothenburg, it uses the Västtrafik API to accomplish this. Written in Rust.

Screenshot

alt text

Installation

For M1 Mac

brew tap sandmanlukas/tap
brew install tram_checker

x86_64-apple-darwin

This requires rust, can be installed with brew install rust.

 curl -LSfs https://github.com/sandmanlukas/tram_checker/raw/master/install.sh | \
        sh -s -- --git sandmanlukas/tram_checker

Generate own token.

A Västtrafik API-token needs to be generated to be able to compile the code. This is easily done by creating and app at Västtrafik API and then to get your <token> you can run the following command.:

echo "<key>:<secret>" | base64

More information about how Västtrafiks OAuth2 authentification works can be found here.

Usage

tram_checker 1.0
Lukas Sandman
A simple CLI-app to get information about coming trams and buses in Gothenburg.

USAGE:
    tram_checker [OPTIONS] <STATION>

ARGS:
    <STATION>    The tram station to display info about

OPTIONS:
    -d, --date <DATE>    If specified, displays information on the coming trams/buses on specified
                         date. Date must be in YYYY-MM-DD format. If not specified, uses current
                         date
    -h, --help           Print help information
    -t, --time <TIME>    If specified, displays information on the coming trams/buses 20min from
                         specified time. Time must be in HH:MM format. If not specified, uses the
                         current time
    -V, --version        Print version information

About

CLI application to get upcoming tram/departures from a given tram stop in Gothenburg. Written in Rust.

Resources

Stars

Watchers

Forks

Packages

No packages published