12 [qw( vi digraphs charset browser writing sc/lotv termcol dieren )],
13 [qw( readline latin unicode countries emoji perl )],
14 [qw( vimperator mutt nethack mplayer font codec )],
15 [qw( apl less screen digits sc/bw sc/hots termcol/legacy keyboard )],
16 [qw( chars/table/html sample source plan )],
20 (map { $_ => 'yearly' } qw[ readline nethack mplayer apl ]),
21 (map { $_ => 'weekly' } qw[ browser ]),
24 my %known = map { s{/.*}{}r => 1 } map { @{$_} } @pages;
25 $known{$_} or warn "page $_ undeclared\n"
26 for grep { !/\./ } map { s/\.plp\z//r } glob '*.plp';
28 say '<?xml version="1.0" encoding="UTF-8"?>';
29 say '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';
30 for my $group (@pages) {
32 for my $file (@{$group}) {
33 (my $page = $file) =~ s/\Aindex\z//;
36 my $stat = stat $file or do {
37 warn "missing file $file\n";
42 print "<loc>http://sheet.shiar.nl/$page</loc>";
43 printf '<changefreq>%s</changefreq>', $freq{$page} // 'monthly';
44 printf '<priority>%.2f</priority>', $prio;
45 printf '<lastmod>%s</lastmod>', localtime($stat->mtime)->date;