Alfred workflow for getting NS Train schedule.
⚠️ This workflow requires Alfred 5. Alfred 4 users can use version 2.0 of the workflow.
Project requires Python 3.8+ to run, which is not included by default with macOS. You can install Python 3 using this guide.
⚠️ Make sure to get an API key from https://apiportal.ns.nl/ and set it in a user configuration of the workflow. Subscribe to the product NS-App.
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.
ns
and the name of the origin station, confirm origin station choice by pressing "Enter"Workflow will display a list of
upcoming trains for the route you have specified. Pressing Enter
on a schedule item will open it on NS website in your default browser, where
you can get more details.
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
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.