sitemap: recognise missing [brahmi] page
[sheet.git] / tools / mksitemap
index 8b16f6fdcd3aa0e342738485aea0ed58039a4ed9..12255b7fec34cc44736434fd2cf07f1c0d71ee14 100755 (executable)
@@ -12,7 +12,7 @@ my @pages = (
        [qw( vi digraphs charset browser writing sc/2 termcol )],
        [qw( readline latin unicode countries emoji perl )],
        [qw( vimperator mutt nethack mplayer font )],
-       [qw( apl less screen brahmi digits sc termcol/legacy )],
+       [qw( apl less screen digits sc termcol/legacy )],
        [qw( chars/table/html source )],
 );
 
@@ -33,11 +33,16 @@ for my $group (@pages) {
                (my $page = $file) =~ s/\Aindex\z//;
                $file =~ s{/.*}{};
                $file .= '.plp';
+               my $stat = stat $file or do {
+                       warn "missing file $file\n";
+                       next;
+               };
+
                print '<url>';
                print "<loc>http://sheet.shiar.nl/$page</loc>";
                printf '<changefreq>%s</changefreq>', $freq{$page} // 'monthly';
                printf '<priority>%.2f</priority>', $prio;
-               printf '<lastmod>%s</lastmod>', localtime(stat($file)->mtime)->date;
+               printf '<lastmod>%s</lastmod>', localtime($stat->mtime)->date;
                say '</url>';
        }
        $prio -= .1;