From 297e838b5a08ccc4d7eaae94d7ed06ecda1a0d9e Mon Sep 17 00:00:00 2001 From: "Paul Buetow (mars.fritz.box)" Date: Tue, 1 Oct 2013 20:14:34 +0200 Subject: add sitemap --- sitemap.buetow.org/SITEMAP | 0 sitemap.buetow.org/content/home.xml | 59 +++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 sitemap.buetow.org/SITEMAP create mode 100644 sitemap.buetow.org/content/home.xml (limited to 'sitemap.buetow.org') diff --git a/sitemap.buetow.org/SITEMAP b/sitemap.buetow.org/SITEMAP new file mode 100644 index 0000000..e69de29 diff --git a/sitemap.buetow.org/content/home.xml b/sitemap.buetow.org/content/home.xml new file mode 100644 index 0000000..39e615f --- /dev/null +++ b/sitemap.buetow.org/content/home.xml @@ -0,0 +1,59 @@ + + + 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; + + + -- cgit v1.2.3