reise is Norwegian for journey or travel. This small command-line tool
searches for public transports and departure times from any place you want.
Will find any place, stop or not, and give you a choice when searching.
Caches the places in <repo>/stops.json with all the information you would need.
The tool allows you to filter out modes of travel, be it bus or tram, and only
display those.
Future enhancements will be journey planning, location of vehicle, delays and distance to the user.
Warning
Early in development - API-breaking changes may occur at any moment! Pull latest changes and reinstall dependencies if needed:
git pull
pip install -r requirements.txtClone this repo
git clone https://github.com/abnore/reise-cli
cd reise-cliTo have reise.py as an executable, symlink it in your local path as reise
or copy/move after doing a chmod +x on the script. First find out what your
$PATH is by writing
echo $PATH | tr : "\n"This will list out your path, and you may choose whichever on that list.
For example, if my path is ~/.local/bin, then you can write:
chmod +x reise.py
ln -s /full/path/reise.py ~/.local/bin/reiseNow you can use it like any other command
reise jernbanetorget -bIt is recommended to install dependencies in an isolated environment instead of system-wide in newer versions of Python:
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txtTo exit the environment later:
deactivateAlthough you can also simply break system packages with, e.g.:
pip3 install rich --break-system-packagesThis will install globally which made more sense for me, not having to be in a virtual environment
If symlinked or installed then usage is simple:
reise [OPTIONS] <stop name>
Flags can be on before or after the stop name, and in any order.
The filter flags, [-Rbmtwrfx] can also be combined
reise <stop> show departures
reise <stop> -b buses only
reise -m <stop> metro only
reise <stop> -t trams only
reise <stop> -r train/rail only
reise <stop> -bm bus + metro
reise -R <stop> bypass cache, show all matches
reise -l/--list list cached stops
reise -i/--info <stop> show cached metadata
reise -n a : b rename cached stop
reise -d <stop> delete from cache
reise -c clear cache
reise -v show version
