Map::Metro::Cmd - The command line interface
Version 0.2405, released 2016-07-23.
#* 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
This collection of commands exposes several parts of the Map::Metro api.
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.
$city
Map::Metro::Plugin::Map
Does route for all stations in the Map::Metro::Plugin::Map::$city map. This gets exponentially slower with bigger maps.
Map::Metro::Plugin::Map::$city
Lists all installed maps on the system.
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.
Lists all lines in the Map::Metro::Plugin::Map::$city map.
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.
$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.
Lists all stations in the Map::Metro::Plugin::Map::$city map. This displays station ids for easy search with route.
It's there if you need it...
https://github.com/Csson/p5-Map-Metro
https://metacpan.org/release/Map-Metro
Erik Carlsson <info@code301.com>
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.
To install Map::Metro, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Map::Metro
CPAN shell
perl -MCPAN -e shell install Map::Metro
For more information on module installation, please visit the detailed CPAN module installation guide.