parent eeda14fc62
commit 670eec71b2
  1. 11
      wiki-tile.pl

@ -282,13 +282,22 @@ if($html_document)
open (my $fh, "> $outfile") or croak "Couldn't open $outfile for writing: $!"; open (my $fh, "> $outfile") or croak "Couldn't open $outfile for writing: $!";
say $fh wrap_in_html($grid); say $fh wrap_in_html($grid);
close $fh; close $fh;
if($regiondir)
{
chdir $regiondir || croak "Couldn't chdir to $regiondir: $!";
while(my ($region, $region_grid) = each %region_grids)
{
open (my $region_fh, "> $region.html") or croak "Couldn't open $region.html for writing: $!";
say $region_fh wrap_in_html($region_grid);
close $region_fh;
}
}
} }
else else
{ {
open (my $fh, "> $outfile") or croak "Couldn't open $outfile for writing: $!"; open (my $fh, "> $outfile") or croak "Couldn't open $outfile for writing: $!";
say $fh $grid->render; say $fh $grid->render;
close $fh; close $fh;
say STDERR $regiondir;
if($regiondir) if($regiondir)
{ {
chdir $regiondir || croak "Couldn't chdir to $regiondir: $!"; chdir $regiondir || croak "Couldn't chdir to $regiondir: $!";

Loading…
Cancel
Save