summaryrefslogtreecommitdiff
path: root/sitemap.buetow.org
diff options
context:
space:
mode:
authorPaul Buetow (mars.fritz.box) <paul@buetow.org>2013-10-01 20:14:34 +0200
committerPaul Buetow (mars.fritz.box) <paul@buetow.org>2013-10-01 20:14:34 +0200
commit297e838b5a08ccc4d7eaae94d7ed06ecda1a0d9e (patch)
tree3d747e596d395de971af1cba8514831d7007429e /sitemap.buetow.org
parent5753c49571753f0378a542796bb40d4ed17ea92d (diff)
add sitemap
Diffstat (limited to 'sitemap.buetow.org')
-rw-r--r--sitemap.buetow.org/SITEMAP0
-rw-r--r--sitemap.buetow.org/content/home.xml59
2 files changed, 59 insertions, 0 deletions
diff --git a/sitemap.buetow.org/SITEMAP b/sitemap.buetow.org/SITEMAP
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/sitemap.buetow.org/SITEMAP
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 @@
+<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
+<content>
+ <pagetitle>Sitemap</pagetitle>
+ <textheader>All sites hosted</textheader>
+ <text>
+ <noop>Here are all sites hosted within this instance of </noop>
+ <namedlink href="http://xerl.buetow.org">Xerl</namedlink>
+ <noop>.</noop>
+ </text>
+ <information>
+ <text>
+ <noop>All hosts ending with </noop>
+ <strong>.foo</strong>
+ <noop> are most likely dev, test or PoCs. Don't expect to find anything usefull there. Also, generally here is lots of crap listed.</noop>
+ </text>
+ </information>
+ <text>
+ <perl>
+ # Ugly but works for now
+ my $hostroot = $config-&gt;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;
+ </perl>
+ </text>
+</content>