NAME

Map::Metro::Cmd - The command line interface

VERSION

Version 0.2405, released 2016-07-23.

SYNOPSIS

    #* General form
    $ map-metro.pl <command> [ <city> ] [ <arguments> ]

    #* Prints the route using the PrettyPrinter hook plugin
    $ map-metro.pl route 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. This gets exponentially slower with bigger maps.

map-metro.pl available

Lists all installed maps on the system.

map-metro.pl graphviz $city --into=$file

Creates a png via GraphViz2.

If into=$file is given the png is saved with that filename, otherwise a timestamped file will be saved in the current directory.

map-metro.pl lines $city

Lists all lines in the Map::Metro::Plugin::Map::$city map.

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 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 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 quotes if the name contains spaces.

Searches for routes in the Map::Metro::Plugin::Map::$city between $from and $to.

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.

map-metro.pl help

It's there if you need it...

SOURCE

https://github.com/Csson/p5-Map-Metro

HOMEPAGE

https://metacpan.org/release/Map-Metro

AUTHOR

Erik Carlsson <info@code301.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by Erik Carlsson.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.