-all: data/digraphs.inc.pl data/unicode-cover.inc.pl data/countries.inc.pl data/browser data/termcol-xcolor.inc.pl
+all: sitemap.xml data/digraphs.inc.pl data/unicode-cover.inc.pl data/countries.inc.pl data/browser data/termcol-xcolor.inc.pl
more: all data/digraphs-xorg.inc.pl
download: data/DerivedAge.txt data/rfc1345.txt data/xorg-compose data/countryInfo.txt data/browser/caniuse data/browser/usage-wm.tsv data/xcolors
.PHONY: download
+sitemap.xml: tools/mksitemap
+ $< >$@
+
data/DerivedAge.txt:
tools/wget-ifmodified http://www.unicode.org/Public/UNIDATA/$(@F) $@
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
-<url>
- <loc>http://sheet.shiar.nl/</loc>
- <changefreq>monthly</changefreq>
- <priority>1.00</priority>
-</url>
-<url>
- <loc>http://sheet.shiar.nl/readline</loc>
- <changefreq>yearly</changefreq>
- <priority>0.80</priority>
-</url>
-<url>
- <loc>http://sheet.shiar.nl/vi</loc>
- <changefreq>monthly</changefreq>
- <priority>0.80</priority>
-</url>
-<url>
- <loc>http://sheet.shiar.nl/vimperator</loc>
- <changefreq>monthly</changefreq>
- <priority>0.70</priority>
-</url>
-<url>
- <loc>http://sheet.shiar.nl/mutt</loc>
- <changefreq>monthly</changefreq>
- <priority>0.70</priority>
-</url>
-<url>
- <loc>http://sheet.shiar.nl/nethack</loc>
- <changefreq>yearly</changefreq>
- <priority>0.70</priority>
-</url>
-<url>
- <loc>http://sheet.shiar.nl/mplayer</loc>
- <changefreq>yearly</changefreq>
- <priority>0.70</priority>
-</url>
-<url>
- <loc>http://sheet.shiar.nl/digraphs</loc>
- <changefreq>monthly</changefreq>
- <priority>0.80</priority>
-</url>
-<url>
- <loc>http://sheet.shiar.nl/charset</loc>
- <changefreq>monthly</changefreq>
- <priority>0.80</priority>
-</url>
-<url>
- <loc>http://sheet.shiar.nl/unicode</loc>
- <changefreq>monthly</changefreq>
- <priority>0.80</priority>
-</url>
-<url>
- <loc>http://sheet.shiar.nl/source</loc>
- <changefreq>monthly</changefreq>
- <priority>0.60</priority>
-</url>
-<url>
- <loc>http://sheet.shiar.nl/writing</loc>
- <changefreq>monthly</changefreq>
- <priority>0.75</priority>
-</url>
-</urlset>
--- /dev/null
+#!/usr/bin/env perl
+use 5.014;
+use warnings;
+
+our $VERSION = '1.00';
+
+my @pages = (
+ [''],
+ [qw( readline vi digraphs charset unicode )],
+ [qw( vimperator mutt nethack mplayer )],
+ [qw( writing )],
+ [qw( source )],
+);
+
+my %freq = (
+ (map { $_ => 'yearly' } qw[ readline nethack mplayer ]),
+);
+
+say '<?xml version="1.0" encoding="UTF-8"?>';
+say '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';
+for my $group (@pages) {
+ state $prio = 1;
+ for my $page (@{$group}) {
+ print '<url>';
+ print "<loc>http://sheet.shiar.nl/$page</loc>";
+ printf '<changefreq>%s</changefreq>', $freq{$page} // 'monthly';
+ printf '<priority>%.2f</priority>', $prio;
+ say '</url>';
+ }
+ $prio -= .1;
+}
+say '</urlset>';
+