index: release v1.18 with only altgr index linked
[sheet.git] / tools / mksitemap
index 7407392fa95b50f0ab63e054eb8570712e2c6e8e..0b4a7344ea6b83a5e207b97248d40fb84fb04653 100755 (executable)
@@ -2,7 +2,7 @@
 use 5.014;
 use warnings;
 
-our $VERSION = '1.01';
+our $VERSION = '1.04';
 
 use File::stat;
 use Time::Piece;
@@ -10,9 +10,20 @@ use Time::Piece;
 my @pages = (
        [qw( index )],
        [qw( vi digraphs charset browser writing sc/lotv termcol dieren )],
-       [qw( readline latin unicode countries emoji perl )],
-       [qw( vimperator mutt nethack mplayer font codec )],
-       [qw( apl less screen digits sc/bw sc/hots termcol/legacy keyboard )],
+       [qw( readline latin unicode countries emoji perl keyboard/altgr )],
+       [qw(
+               vimperator mutt nethack mplayer/mpv font codec
+               keyboard/altgr/windows keyboard/altgr/macos
+               dieren/uitgebreid dieren/beknopt
+       )],
+       [qw(
+               apl less screen digits sc/bw sc/hots termcol/legacy mplayer
+               digraphs/xorg
+               keyboard/altgr/macos-abc keyboard/altgr/msx keyboard/altgr/ukext
+               keyboard/altgr/eurkey keyboard/altgr/apl keyboard/altgr/spacecadet
+               keyboard/altgr/ipa keyboard/altgr/boyeg keyboard/altgr/drix
+               keyboard/altgr/symbolics keyboard/altgr/msx-graph
+       )],
        [qw( chars/table/html sample source plan )],
 );
 
@@ -31,15 +42,20 @@ for my $group (@pages) {
        state $prio = 1;
        for my $file (@{$group}) {
                (my $page = $file) =~ s/\Aindex\z//;
-               $file =~ s{/.*}{};
-               $file .= '.plp';
+               if (-e "$file.eng.inc.pl") {
+                       $file .= '.eng.inc.pl';
+               }
+               else {
+                       $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>";
+               print "<loc>https://sheet.shiar.nl/$page</loc>";
                printf '<changefreq>%s</changefreq>', $freq{$page} // 'monthly';
                printf '<priority>%.2f</priority>', $prio;
                printf '<lastmod>%s</lastmod>', localtime($stat->mtime)->date;