diff --git a/wiki-tile.pl b/wiki-tile.pl index ad7f11a..723ec47 100644 --- a/wiki-tile.pl +++ b/wiki-tile.pl @@ -1,9 +1,11 @@ use v5.30; -use MediaWiki::API; use HexGrid; use HexGrid::Pin; use MWTemplate; +use MediaWiki::API; + +use Getopt::Long; use Carp; use Data::Dumper; @@ -20,6 +22,15 @@ my $border_width = 1; my $border_colour = 'black'; my $show_coords = 0; +GetOptions( + 'border-width=f' => \$border_width, + 'border-colour|border-color=s' => \$border_colour, + 'show-coords|coords!' => \$show_coords, + 'api-url=s' => \$api_url, + 'region-template-name=s' => \$region_template_name, + 'site-template-name=s' => \$site_template_name +); + my $grid = HexGrid->new(defaults => { style => { 'stroke-width' => $border_width, stroke => $border_colour }, show_coords => $show_coords });