Alfred workflow for getting NS Train schedule.
Project requires Python 3.8+ to run, which is not included by default with macOS. You can install Python 3 using this guide.
Download NS_Schedule.alfred5workflow
file from the latest release
at Releases page and open it with Alfred.
Change the value of NS_APIKEY variable to the value you've received from NS at the Prerequisites step.
Open Alfred and type ns
and names of two train stations you want to see schedule for. Workflow will display list of
upcoming trains for the route you have specified. Pressing Enter
on a displayed item will open it on NS website, so
you can get more details.
⚠️ For places with names consisting of multiple words, use_
(underscore) instead of space inside the name, e.g. for trains between Den Haag Centraal and Amsterdam Bijlmer Arena typeden_haag_centraal amsterdam_bijlmer_arena
Make sure to first install test dependencies:
pip3 install -r requirements.txt
To run tests, execute
python3 -m ns_schedule_test
If you want to get coverage figures through coverage
tool:
coverage run -m unittest ns_schedule_test # gather test data
coverage report -m # display coverage figures
- Python 3.8
- GNU Make - Build scripting
- coverage.py - Code coverage measurement
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License - see the LICENSE.md file for details
See Contributors for the list of contributors.