From 7f0ed2085484b3da4961e1004ff8e1e41eb9b9ee Mon Sep 17 00:00:00 2001 From: "Paul Buetow (europa)" Date: Sun, 2 Aug 2015 20:02:14 +0100 Subject: reintro .org --- sitemap.buetow.org/SITEMAP | 0 sitemap.buetow.org/content/home.xml | 21 ++++++++++++++++++++ sitemap.buetow.org/content/sitemap.inc.pl | 33 +++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 sitemap.buetow.org/SITEMAP create mode 100644 sitemap.buetow.org/content/home.xml create mode 100644 sitemap.buetow.org/content/sitemap.inc.pl (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..a6d72ad --- /dev/null +++ b/sitemap.buetow.org/content/home.xml @@ -0,0 +1,21 @@ + + + Sitemap + All sites hosted + + Here are all sites hosted within this instance of + Xerl + . + + + + Important notice: + The host + .alpha.buetow.org + contains only development, test and PoC stuff. + + + + sitemap.inc.pl + + diff --git a/sitemap.buetow.org/content/sitemap.inc.pl b/sitemap.buetow.org/content/sitemap.inc.pl new file mode 100644 index 0000000..6b08b82 --- /dev/null +++ b/sitemap.buetow.org/content/sitemap.inc.pl @@ -0,0 +1,33 @@ +my $hostroot = $config->get_hostroot(); + +sub space () { " " x 10 } +sub nl () { "
\n" } + +sub list (*) { + my $tag = shift; + my @homepages = sort `find $hostroot -name $tag`; + my @ret = (); + + for my $homepage (sort @homepages) { + my ($host) = $homepage =~ /.*hosts.(.*?).$tag/; + push @ret, "$host", nl; + + my $sitepath = "$hostroot/$host"; + + my @pages = sort `find $sitepath -name \*.xml`; + for my $page (sort @pages) { + my ($site) = $page =~ m#$host/content/(.*)\.xml$#; + $site =~ s#\.sub/#/#g; + $site =~ s#\d\d\.##g; + next if $site eq 'home'; + my $sitelink = "http://$host?site=$site"; + push @ret, space, "$site", nl; + } + + push @ret, nl; + } + + join '', @ret; +} + +list SITEMAP; -- cgit v1.2.3