|
|
@ -177,7 +177,6 @@ foreach my $page (values %{$location_query_results->{query}{pages}}) |
|
|
|
foreach my $coords (split /;/, $parsed_template->{named_params}{context_tiles}) |
|
|
|
foreach my $coords (split /;/, $parsed_template->{named_params}{context_tiles}) |
|
|
|
{ |
|
|
|
{ |
|
|
|
do { carp "Skipping bad spec: $coords"; next; } unless $coords =~ $coords_regex; |
|
|
|
do { carp "Skipping bad spec: $coords"; next; } unless $coords =~ $coords_regex; |
|
|
|
# $location_with_context->add_tile($grid->get_tile_at($1, $2)); |
|
|
|
|
|
|
|
push @coords_list, { nw => $1, sw => $2 }; |
|
|
|
push @coords_list, { nw => $1, sw => $2 }; |
|
|
|
} |
|
|
|
} |
|
|
|
my $location_grid = $grid->subgrid_for_tiles(@coords_list); |
|
|
|
my $location_grid = $grid->subgrid_for_tiles(@coords_list); |
|
|
@ -197,8 +196,6 @@ foreach my $page (values %{$location_query_results->{query}{pages}}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# HexGrid::Image::DEBUG(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
say STDERR "Getting Background image pages"; |
|
|
|
say STDERR "Getting Background image pages"; |
|
|
|
my $background_query_results = $mw->api({ action => 'query', |
|
|
|
my $background_query_results = $mw->api({ action => 'query', |
|
|
|
prop => 'imageinfo', |
|
|
|
prop => 'imageinfo', |
|
|
@ -286,6 +283,12 @@ foreach my $site_page_ref (values %{$site_query_results->{query}{pages}}) |
|
|
|
my $parsed_template = MWTemplate::Parse($site_content, $site_template_name); |
|
|
|
my $parsed_template = MWTemplate::Parse($site_content, $site_template_name); |
|
|
|
next unless $parsed_template; |
|
|
|
next unless $parsed_template; |
|
|
|
my ($nw,$sw) = split /,/, $parsed_template->{named_params}{coords}; |
|
|
|
my ($nw,$sw) = split /,/, $parsed_template->{named_params}{coords}; |
|
|
|
|
|
|
|
my $tile = $grid->get_tile_at($nw, $sw); |
|
|
|
|
|
|
|
unless($tile) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
carp "Coordinates of Site $site_name do not appear in the grid, skipping."; |
|
|
|
|
|
|
|
next; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
my $imageinfo_query_results = $mw->api({ action => 'query', |
|
|
|
my $imageinfo_query_results = $mw->api({ action => 'query', |
|
|
|
prop => 'imageinfo', |
|
|
|
prop => 'imageinfo', |
|
|
@ -304,7 +307,7 @@ foreach my $site_page_ref (values %{$site_query_results->{query}{pages}}) |
|
|
|
link => $site_url, |
|
|
|
link => $site_url, |
|
|
|
description => $parsed_template->{named_params}{abstract} |
|
|
|
description => $parsed_template->{named_params}{abstract} |
|
|
|
); |
|
|
|
); |
|
|
|
$grid->get_tile_at($nw, $sw)->pin($pin); |
|
|
|
$tile->pin($pin); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
my (%path_specs); |
|
|
|
my (%path_specs); |
|
|
|