Skip to main content

Command line application for the iRail API

Project description

clirail

Command line application for the iRail API

iRail provides an API for Belgian trains.

Installation

pip install --user --upgrade clirail

Then make sure the installed executable will be found. On UNIX-like systems, this means checking that ~/.local/bin/ is in your PATH.

Usage

Command Function
clirail <station> ['' <moment>] Liveboard (list of trains departing in station)
clirail <from_station> <to_station> [<moment>] Route planning
clirail Analyse current timeliness in a few stations

Omit the <moment> for ASAP departures.

Give either the station's name or its telegraphic code. Names are matched fuzzily and intuitively. Telegraphic codes are short and sweet, you can learn them by looking at liveboards.

What are these telegraphic codes?

A lot of stations have a short code, like FR for Bruges, FBMZ for Brussels-South and MWL for Aywaille. These come from the days when signalling was done in Morse via the telegraph. Having a short code for common names in the railway world meant the message took significantly less time to send. By memorizing the codes for your favourite stations, you can benefit from them in the same way! More information on the Dutch-language Wikipedia.

Licenses

  • clirail code is released under GNU GPLv3+.
  • xdg is released under ISC.

Known issues

  • If <moment> is just a time, it will be considered as today, even though in some cases it would make more sense to consider it as tomorrow (e.g. at 11 PM planning a route with departure at 7 AM).

Development

To create a virtualenv and install the dependencies in it:

tools/create_venv.py

Activate the virtualenv with source venv/bin/activate. Then run bin/clirail to run the program.

Important: make sure the virtualenv is activated each time you run, otherwise your global clirail installation may be used.

If you introduce dependencies, list them in setup.py under install_requires, and run tools/update_requirements.sh.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clirail-1.7.3.tar.gz (32.5 kB view details)

Uploaded Source

Built Distribution

clirail-1.7.3-py3-none-any.whl (28.6 kB view details)

Uploaded Python 3

File details

Details for the file clirail-1.7.3.tar.gz.

File metadata

  • Download URL: clirail-1.7.3.tar.gz
  • Upload date:
  • Size: 32.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.12

File hashes

Hashes for clirail-1.7.3.tar.gz
Algorithm Hash digest
SHA256 4eecebd64fe1d394d03189056ec1c7e277d392a5ffaa3670a8e2d52ec513bb31
MD5 02a48cef42692fb9215265355d7d0619
BLAKE2b-256 8d9ffedf4f760d973f09677b842a23d85eddf1e08f15534733a4243252dacde2

See more details on using hashes here.

File details

Details for the file clirail-1.7.3-py3-none-any.whl.

File metadata

  • Download URL: clirail-1.7.3-py3-none-any.whl
  • Upload date:
  • Size: 28.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.12

File hashes

Hashes for clirail-1.7.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ec35021e6fdce895b67ec3963b48e732ba8a08ccb44b934f7d7d5c96041b98a3
MD5 6bcf497301fa9effec2b851001e70f0c
BLAKE2b-256 2c6aeb0e1a87c98f21f5f903ae9b522b4b535b68eb98cb271e312fe4c286e28f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page