1.1.1 • Published 9 years ago

hzpp v1.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

hzpp

HŽ train schedule in seconds.

A command-line utility for quick HŽ train schedule listing.

Installation

$ npm i -g hzpp

If you're upgrading from 1.0.0 to a newer version please uninstall first or delete the old configuration file.

$ npm rm -g hzpp

Usage

Show the train schedule for configured lines.

$ hzpp

Call the program with any arguments to show help.

Configuration

Editing

Edit the config.json file located in the module's root folder to configure program options. To get the configuration file location enter the following command.

$ hzpp help

If anything wrong happens with your configuration you can always reinstall the package (see Installation) or remove the config.json file and replace it with defaultConfig.json.

Format

Configuration is done on two levels:

  1. default - applies to all lines. In defaults object in the configuration.
  2. per line configuration - applies to given line. In each element of the lines array.

Per line configurations override defaults.

Currently supported configuration options:

  • from - departure train station (see Station naming)
  • to - arrival train station (see Station naming)
  • label - display name to show
  • limit - maximum number of trains to show
  • showArrival - show arrival times next to departure times in parentheses

Station naming

To find out what's the encoded name of your train station go to HŽ vozni red. Enter your station and some arbitrary other station and submit. The NKOD1 argument in URL is the encoded station name.