Sitemap
All sites hosted
Here are all sites hosted within this instance of
Xerl
.
All hosts ending with
.foo
are most likely dev, test or PoCs. Don't expect to find anything usefull there. Also, generally here is lots of crap listed.
# Ugly but works for now
my $hostroot = $config->get_hostroot();
sub getf ($) {
open my $f, $_[0] or die "$!: $_[0]\n";
my @slurp = !!LT!!$f!!GT!!;
close $f;
@slurp;
}
sub nl () { "!!LT!!br /!!GT!!\n" }
sub list (*) {
my $tag = shift;
my @found = sort `find $hostroot -name $tag`;
my $ret = '';
for my $found (@found) {
$found =~ /.*hosts.(.*?).$tag/;
my $host = $1;
my @content = getf $found;
$ret .= "!!LT!!b!!GT!!!!LT!!a href=http://$host!!GT!!$host!!LT!!/a!!GT!!!!LT!!/b!!GT!!" . nl;;
if (@content) {
$ret .= join " ", @content;
$ret .= nl;
}
$ret .= nl;
}
$ret;
}
my $ret = list SITEMAP;
$ret;