NAME
Map::Metro::Cmd - The command line interface
SYNOPSIS
#* General form
$ map-metro.pl <command> [ <city> ] [ <arguments> ]
#* Does the same as $graph->routes_for('Sundbybergs centrum', 'T-Centralen')->to_text
$ map-metro.pl map Stockholm 'Sundbybergs centrum' T-Centralen
DESCRIPTION
This collection of commands exposes several parts of the Map::Metro api.
COMMANDS
If a command takes $city
, it is mandatory. Normally it should be a module name in the Map::Metro::Plugin::Map
namespace (but only the significant part is necessary). If, however, it contains att least one dot it is assumed to be a file path to a map file. The map file is parsed via Map::Metro::Shim.
map-metro.pl all_routes $city
Does route for all stations in the Map::Metro::Plugin::Map::$city
map.
map-metro.pl available
Lists all installed maps on the system.
map-metro.pl help
It's there if you need it...
map-metro.pl lines $city
Lists all lines in the Map::Metro::Plugin::Map::$city
map.
map-metro.pl route $city $from $to
$from
Mandatory. The starting station, can be either a station id (integer), or a station name (string). Must be of the same type as $to
. Use single quotes if the name contains spaces.
$to
Mandatory. The finishing station, can be either a station id (integer), or a station name (string). Must be of the same type as $from
. Use single quotes if the name contains spaces.
Searches for routes in the Map::Metro::Plugin::Map::$city
between $from
and $to
.
map-metro.pl metro_to_tube $city
Converts Map::Metro::Plugin::Map::$city
into a Map::Tube ready xml-file. The file is saved in the current working directory with a timestamped filename.
map-metro.pl stations $city
Lists all stations in the Map::Metro::Plugin::Map::$city
map. This displays station ids for easy search with route.
AUTHOR
Erik Carlsson <info@code301.com>
COPYRIGHT
Copyright 2014 - Erik Carlsson
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.