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
- Type
ns
and the name of the origin station, confirm origin station choice by pressing "Enter" - Type the name of the destination station, confirm destination 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
- 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.