#!/usr/bin/perl
use strict;
my $site = shift @ARGV;
my $url = sprintf "http://archives.yotsubasociety.org/%s/%s/", $site, shift @ARGV;
my $title = "@ARGV";
my $template = q{
<!DOCTYPE html>
<html>
<head>
	<title>%s</title>
</head>
<body>
<h1>%s</h1>
%s
</body>
</html>
};

my @files = map { sprintf '<a href="%s%s">%s</a>', $url, $_, $_=~m/(.+)\.[^\.]+$/ } glob "*.html";

printf $template, $title, $title, join "<p>\n", @files;