#!/usr/bin/env perl use 5.014; use warnings; our $VERSION = '1.00'; use File::stat; use Time::Piece; my @pages = ( [qw( index )], [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( chars/table/html source )], ); my %freq = ( (map { $_ => 'yearly' } qw[ readline nethack mplayer apl ]), (map { $_ => 'weekly' } qw[ browser ]), ); my %known = map { s{/.*}{}r => 1 } map { @{$_} } @pages; $known{$_} or warn "page $_ undeclared\n" for grep { !/\./ } map { s/\.plp\z//r } glob '*.plp'; say ''; say ''; for my $group (@pages) { state $prio = 1; for my $file (@{$group}) { (my $page = $file) =~ s/\Aindex\z//; $file =~ s{/.*}{}; $file .= '.plp'; print ''; print "http://sheet.shiar.nl/$page"; printf '%s', $freq{$page} // 'monthly'; printf '%.2f', $prio; printf '%s', localtime(stat($file)->mtime)->date; say ''; } $prio -= .1; } say '';