Skip to content
This repository has been archived by the owner on Jul 13, 2019. It is now read-only.

Commit

Permalink
README updated some documentation and links
Browse files Browse the repository at this point in the history
  • Loading branch information
geertw committed Jun 12, 2016
1 parent b2c80a0 commit 5e993d5
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ need for a MySQL server (instead solely relying on Redis) and a rewrite of the I
Installation
------------

This software is tested on Debian and Ubuntu Linux.
This software is tested on Debian and Ubuntu Linux, but it should work on any Linux distribution.

You'll need a MySQL server and a Redis instance (they do not to be installed on the same machine).
A MySQL database is used to store the complete schedule (called the IFF schedule).
You'll need a MySQL server and a Redis instance (not necessarily installed on the same machine).
A MySQL database is used to store the complete schedule (called the IFF dataset).
The Redis instance is used to lookup today's schedule and to store real-time updates about train services.

To install, run through the following steps:
Expand All @@ -52,17 +52,19 @@ To install, run through the following steps:
0. Create the database and import the IFF dataset by running `iff-loader.py --create_tables`
0. Load the current schedule by running `scheduler.py`.
0. Receive status updates by running `arnu-listener.py` (in the background, if working correctly).
0. Provide an HTTP interface by running `http-server.py` (for testing/debugging) or by configuring access to `http.wsgi` (for production).
0. Provide an HTTP interface by running `http-server.py` (for testing/debugging usage),
or by configuring a WSGI server like [uWSGI](https://github.com/unbit/uwsgi) (for production usage).
Set it up to serve `http.wsgi`.

### Keeping the schedule up-to-date

0. Set up cronjobs to run `cleanup.py` and `scheduler.py` regularly. Both should run once a day.
- `cleanup.py` removes old schedules from your Redis database.
- `scheduler.py` loads the schedule for today in your Redis database.
0. Refresh your IFF dataset at least weekly.
- Download a new IFF schedule from NDOVloket.
- Convert it by running `iff-converter.py`
- Load the IFF schedule into MySQL by running `iff-loader.py --truncate_tables`
- Make sure the MySQL user in your configuration file has permissions to truncate tables and insert data.
- Use the script in `contrib/ndov/new-iff.sh` to download and process IFF datasets from NDOVloket.
- The script automatically updates your MySQL database when a new IFF dataset is detected.

### Access to static and realtime schedules

Expand All @@ -72,9 +74,9 @@ with [NDOVloket](https://www.ndovloket.nl/).

From NDOVloket, you need:

- The [NS IFF dataset](https://ndovloket.nl/helpdesk/kb/13/), which contains the (static) train schedule for the whole year.
- The [NS IFF dataset](https://ndovloket.nl/documentatie.html), which contains the (static) train schedule for the whole year.
NDOVloket provides the IFF dataset as a zip file containing all required source files.
- [AR-NU Ritinfo](https://ndovloket.nl/helpdesk/kb/36/). AR-NU provides you with realtime updates about delayed trains, cancelled trains, etc.
- [AR-NU Ritinfo](https://ndovloket.nl/documentatie.html). AR-NU provides you with realtime updates about delayed trains, cancelled trains, etc.
NDOVloket provides the AR-NU message feed via ZeroMQ.

It is recommended to not connect directly to NDOVloket's ZeroMQ server, but
Expand Down

0 comments on commit 5e993d5

Please sign in to comment.