From 0e63a8d64fdf5993b05b83f0082ec70a8a85a3e4 Mon Sep 17 00:00:00 2001 From: Daniel Asher Resnick Date: Wed, 27 Dec 2023 16:40:28 -0600 Subject: [PATCH] Use rlib to find module in same dir --- wiki-map.pl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/wiki-map.pl b/wiki-map.pl index 78e44ac..3b2e13a 100644 --- a/wiki-map.pl +++ b/wiki-map.pl @@ -1,4 +1,5 @@ use v5.36; +use rlib '.'; use HexGrid; use HexGrid::Pin; @@ -15,7 +16,7 @@ use feature "signatures"; no warnings "experimental::signatures"; # This regex is a whitespace forgiving version of /^(-?\d+),(-?\d+)/, an int pair -my $coords_regex = qr/^\s*(-?\s*\d+)\s*,\s*(-?\s*\d+)\s*$/; +my $coords_regex = qr/^\s*(\s*-?\d+\s*)\s*,\s*(\s*-?\d+\s*)\s*$/; my $api_url; @@ -57,7 +58,6 @@ my $grid = HexGrid->new(embed_images => $embed_images, defaults => { style => { 'stroke-width' => $border_width, stroke => $border_colour }, show_coords => $show_coords}); -# my %region_grids; my %regions_by_subregion; my %images_for_region_grids; my %location_grids; @@ -223,9 +223,6 @@ foreach my $page (values %{$background_query_results->{query}{pages}}) } } -# say STDERR Dumper($grid->{images}); -# say STDERR Dumper(\%images_for_region_grids); - say STDERR "Getting Tile pages"; @@ -269,12 +266,13 @@ my $site_query_results = $mw->api inprop => 'url', } ) || croak $mw->{error}->{code} . ': ' . $mw->{error}->{details}; -# say STDERR "Sites found: " . join(" ,", map { $_->{title} } @$site_pages); foreach my $site_page_ref (values %{$site_query_results->{query}{pages}}) { next if $site_page_ref->{title} =~ /^Category:/; my $site_name = $site_page_ref->{title}; + say STDERR "Processing Site $site_name"; + my $site_url = $site_page_ref->{canonicalurl}; my $site_content = $site_page_ref->{revisions}[0]{'*'}; my $parsed_template = MWTemplate::Parse($site_content, $site_template_name);