initial initial
authorJoey Schulze <joey@infodrom.org>
Sat, 27 May 2000 14:04:06 +0000 (14:04 +0000)
committerJoey Schulze <joey@infodrom.org>
Sat, 27 May 2000 14:04:06 +0000 (14:04 +0000)
Makefile [new file with mode: 0644]
Styles/Makefile [new file with mode: 0644]
Styles/addresses.inc [new file with mode: 0644]
Styles/basic.style [new file with mode: 0644]
Styles/quote.style [new file with mode: 0644]
bin/fixsuffix [new file with mode: 0755]
bin/wmldepend.sh [new file with mode: 0755]
src/Makefile [new file with mode: 0644]
src/index-tools.pl [new file with mode: 0644]
src/index.html.de.wml [new file with mode: 0644]
src/index.html.en.wml [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..64bf2b1
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,26 @@
+DEST = /var/lib/webspace/www.infodrom.ffis.de
+
+TEST = $(HOME)/public_html/infodrom
+
+FILES = --exclude "CVS/" --exclude "*imgdot-1x1-transp.gif" --include "*/"
+FILES+= --include "*.jpg" --include "*.html" --include "*.shtml" --include "*.php3" --include "*.gif"
+FILES+= --exclude "*"
+
+build:
+       cd src && make all
+
+test:
+       test -d $(TEST) || mkdir $(TEST)
+       rsync -lptr $(FILES) src/ $(TEST)/
+#      cd src && for f in *.html; do cp $$f $(TEST)/$$f; done
+
+install:
+       test -d $(DEST) || mkdir $(DEST)
+       rsync -lptr $(FILES) src/ $(DEST)/
+#      cd src && for f in *.html; do cp $$f $(DEST)/$$f; done
+
+clean:
+       -rm -f `find -name '*~'` `find -name '.?*.swp'`
+       -cd src && make clean
+       -cd Styles && make clean
+
diff --git a/Styles/Makefile b/Styles/Makefile
new file mode 100644 (file)
index 0000000..ad6a457
--- /dev/null
@@ -0,0 +1 @@
+clean:
diff --git a/Styles/addresses.inc b/Styles/addresses.inc
new file mode 100644 (file)
index 0000000..b21d294
--- /dev/null
@@ -0,0 +1,14 @@
+<define-tag joey whitespace=delete>
+<if   "%0" ""            "Martin Schulze">
+<ifeq "%0" "mail"        "joey@infodrom.ffis.de">
+<ifeq "%0" "name"        "Martin Schulze &lt;joey@infodrom.ffis.de&gt;">
+<ifeq "%0" "mailto"      "<a href=mailto:joey@infodrom.ffis.de>Martin Schulze</a>">
+</define-tag>
+
+<define-tag webmaster whitespace=delete>
+<if   "%0" ""            "Webmaster">
+<ifeq "%0" "mail"        "webmaster@infodrom.ffis.de">
+<ifeq "%0" "name"        "Webmaster &lt;webmaster@infodrom.ffis.de&gt;">
+<ifeq "%0" "mailto"      "<a href=mailto:webmaster@infodrom.ffis.de>Webmaster</a>">
+</define-tag>
+
diff --git a/Styles/basic.style b/Styles/basic.style
new file mode 100644 (file)
index 0000000..23f474d
--- /dev/null
@@ -0,0 +1,35 @@
+
+# Global color definition
+#
+#<define-tag bgcolor>39dff7</define-tag>
+<define-tag bgcolor>ffffff</define-tag>
+<define-tag textcolor>00000000</define-tag>
+<define-tag body-tag>
+<body bgcolor="#<bgcolor>" text="#<textcolor>" vlink="#000090" alink="#e709f7" link="#1717ef">
+</define-tag>
+<define-tag menu-bgcolor>80CCF8</define-tag>
+<define-tag menu-bgcolorsel>68A4C8</define-tag>
+<define-tag menu-fgcolor>008dfd</define-tag>
+<define-tag box-bdcolor>008dfd</define-tag>
+<define-tag box-bgcolor><bgcolor></define-tag>
+<define-tag box-fgcolor>1014e8</define-tag>
+
+# Page footer
+#
+<define-tag page-footer>
+<hr><address>&#169 <a href="http://www.infodrom.ffis.de/">Infodrom Oldenburg</a>, <:
+@months =
+#    ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
+    ("Dummy", "Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember");
+
+#($date_sec,$date_min,$date_hour,$date_mday,$date_mon,$date_year,$date_wday,$date_isdst)
+#    = localtime(); $date_year += 1900;
+#printf "%d %s %d", $date_mday, $months[$date_mon], $date_year;
+
+"<get-var WML_SRC_ISOTIME>" =~ /^(\d+)-(\d+)-(\d+)\s/;
+
+printf "Last modified: %d. %s %d", $1, $months[$2], $3;
+:></address>
+</define-tag>
+
+
diff --git a/Styles/quote.style b/Styles/quote.style
new file mode 100644 (file)
index 0000000..45e8dbd
--- /dev/null
@@ -0,0 +1,32 @@
+#use wml::std::box
+
+# Quote of the day boxes
+#
+# quotebox-de-shtml
+# quotebox-en-shtml
+# quotebox-de-php
+# quotebox-en-php
+#
+
+# FIXME: Schöner wäre es, wenn ich %0 == "" -> .fortune, sonst %0 abfragen könnte
+
+<define-tag quotebox-de-shtml whitespace=delete>
+  <box header="<font size=-1 face="Helvetica,Arial" color="#<box-bdcolor>"><b>Zitat des Tages</b></font>"
+       bdcolor="#<box-bdcolor>" bdwidth=2 bdspace=10
+       bgcolor="#<box-bgcolor>"
+       width=500>
+    <font face="helvetica,arial" size=-1 color="#<box-fgcolor>">
+    <!--#include file="%0"-->
+    </font>
+  </box>
+</define-tag>
+
+<define-tag quotebox-en-shtml whitespace=delete>
+  <box header="<font size=-1 face="Helvetica,Arial" color="#<box-fgcolor>"><b>Quote of the day</b></font>"
+       bdcolor="#<box-bdcolor>" bdwidth=2 bdspace=10
+       bgcolor="#<box-bgcolor>">
+    <font face="helvetica,arial" size=-1 color="#<box-fgcolor>">
+    <!--#include file="%0"-->
+    </font>
+  </box>
+</define-tag>
diff --git a/bin/fixsuffix b/bin/fixsuffix
new file mode 100755 (executable)
index 0000000..8f6f338
--- /dev/null
@@ -0,0 +1,24 @@
+#! /bin/bash
+
+# Fixes file suffix
+#
+# .html -> .shtml
+#   Require "<!--#include"
+#
+# .html -> .php3
+#   Require "<?"
+
+for f in $*
+do
+    if grep -q '<!--[ ]*#include' $f
+    then
+       base=${f%.html}
+       mv -f $f $base.shtml
+    else
+        if grep -q '<!--[ ]*#include' $f
+       then
+           base=${f%.html}
+           mv -f $f $base.php3
+       fi
+    fi
+done
diff --git a/bin/wmldepend.sh b/bin/wmldepend.sh
new file mode 100755 (executable)
index 0000000..7640a46
--- /dev/null
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+INCPATH=.
+FILES=''
+
+expandfile() {
+       for i in $INCPATH
+       do
+               if [ -f $i/$1 ] 
+               then
+                       echo $i/$1
+                       exit 0
+               fi
+       done
+       echo "Fehler: Includedatei $1 existiert nicht" > /dev/stderr
+       exit 1
+}
+
+findincludes() {
+       for i in $*
+       do
+               for j in `sed -n 's/^#[Ii][Nn][Cc][Ll][Uu][Dd][Ee] *[<"]\([^>"]*\).*/\1/p' $i`
+               do
+                       echo ' \'
+                       foo=`expandfile $j`
+                       echo -n ' '$foo
+                       findincludes $foo
+               done
+       done
+}
+
+while [ "x$1" != "x" ]
+do
+       case "$1" in
+               -I*)
+                       INCPATH=$INCPATH' '${1##-I}
+                       #INCPATH=$INCPATH' '$(1)
+                       ;;
+               *)
+                       FILES=$FILES' '$1
+                       ;;
+       esac
+       shift
+done
+
+export INCPATH
+export FILES
+
+for i in $FILES
+do
+       echo -n `echo $i | sed 's/.wml/.html/'`: $i
+       findincludes $i
+       echo
+done
diff --git a/src/Makefile b/src/Makefile
new file mode 100644 (file)
index 0000000..35d4d24
--- /dev/null
@@ -0,0 +1,29 @@
+WML_FILES = $(wildcard *.wml)
+FILES = $(WML_FILES:%.wml=%.html)
+SFILES = $(WML_FILES:%.wml=%.shtml)
+PFILES = $(WML_FILES:%.wml=%.php3)
+
+DIRS = $(shell find . -maxdepth 1 -type d -not -name . -not -name CVS)
+
+ROOT_PREFIX = $(shell perl -MCwd -e '$$_ = cwd;s/^.*src\/?//;@f=split /\//;$$n=$$\#f+1;print "../"x $$n;' )
+
+IFLAGS = -I. -I$(ROOT_PREFIX)../Styles
+
+.SUFFIXES: .wml .html
+
+.wml.html:
+       /usr/bin/wml -n $(IFLAGS) $*.wml| sed 's:"[a-zA-Z0-9_\.]*\.imgdot-1x1-transp\.gif":"$(ROOT_PREFIX)gifs/imgdot-1x1-transp.gif":' > $*.html
+       $(ROOT_PREFIX)../bin/fixsuffix $*.html
+
+all: $(FILES)
+       test -z "$(DIRS)" || for d in "" $(DIRS); do if [ -n "$$d" ]; then (cp Makefile $$d && cd $$d && make all); fi; done
+
+clean:
+       rm -f $(FILES) $(SFILES) $(PFILES) .depend *.imgdot-1x1-transp.gif
+       test -z "$(DIRS)" || for d in "" $(DIRS); do if [ -n "$$d" ]; then (cp Makefile $$d && cd $$d && make clean); fi; done
+       test -z "$(ROOT_PREFIX)" || rm -f Makefile
+
+depend .depend:
+       $(ROOT_PREFIX)../bin/wmldepend.sh $(IFLAGS) $(WML_FILES) > .depend
+
+include .depend
diff --git a/src/index-tools.pl b/src/index-tools.pl
new file mode 100644 (file)
index 0000000..345935d
--- /dev/null
@@ -0,0 +1,103 @@
+<:
+
+# Hauptmenü generieren
+
+sub main_menu {
+    my @dirs = @_;
+    my $width = 100/($#dirs+1);
+
+    print "<center><table border=0 cellpadding=2 cellspacing=10 width=90%><tr>";
+    foreach $rubrik (@dirs) {
+       if ("<get-var WML_SRC_DIRNAME>" =~ /src\/$rubrik/) {
+           $color="<menu-bgcolorsel>";
+           if ("<get-var WML_SRC_BASENAME>" eq "index") {
+               printf "<th align=center width=%d%% bgcolor=#%s>", $width, $color;
+               print "<font size-=5 color=\"#<menu-bgcolor>\"> · </font>"
+                   if ($rubrik ne $dirs[0]);
+               printf "<font face=\"Helvetica,Arial\" color=\"#<menu-fgcolor>\">%s</font></th>\n", $rubrik;
+           } else {
+               printf "<th align=center width=%d%% bgcolor=#%s>", $width, $color;
+               print "<font size-=5 color=\"#<menu-bgcolor>\"> · </font>"
+                   if ($rubrik ne $dirs[0]);
+               printf "<font face=\"Helvetica,Arial\" color=\"#<menu-fgcolor>\"><a href=%s%s/>%s</a></font></th>\n",
+                       $root_prefix, $rubrik, $rubrik;
+           }
+       } else {
+           $color="<menu-bgcolor>";
+           printf "<th align=center width=%d%% bgcolor=#%s>", $width, $color;
+           print "<font size-=5 color=\"#<menu-bgcolor>\"> · </font>"
+               if ($rubrik ne $dirs[0]);
+           printf "<font face=\"Helvetica,Arial\" color=\"#<menu-fgcolor>\"><a href=%s%s/>%s</a></font></th>\n",
+               $root_prefix, $rubrik, $rubrik;
+       }
+    }
+    print "</tr></table></center>\n";
+}
+
+# @_ ist ein Array, dessen *letztes* Element die Anzahl
+# der Elemente enthaelt
+#
+sub web_calc_table_width
+{
+    my $count = pop(@_);
+    my @widths = @_;
+    my $i;
+    my $mod;
+    my $tabwidth = 0;
+
+    foreach $i (@widths) {
+       $tabwidth = $i if ((($count) % $i) == 0);
+    }
+    if (!$tabwidth) {
+       foreach $i (@widths) {
+           $tabwidth = $i if ((($count) % $i) > $mod);
+           $mod = ($count) % $i;
+       }
+    }
+    return $tabwidth;
+}
+
+sub specials_menu
+{
+    my $tabwidth = 0;
+    my $i;
+    my $elems = shift;
+    my %elems = %$elems;
+    my @keys;
+    my $width;
+    my $foo;
+
+    if (%elems) {
+       @keys = keys %elems;
+       $tabwidth = &web_calc_table_width(6,5,4,3,$#keys+1);
+       $width = 100/$tabwidth;
+       print "<center><table border=0 cellpadding=2 cellspacing=10 width=90%><tr>";
+       $i=0;
+       while ($i <= $#keys) {
+           print "<tr>" if (! ($i % $tabwidth));
+
+           $foo = sprintf ("<font face=\"Helvetica,Arial\" color=\"#<menu-fgcolor>\"><a href=\"%s\">%s</a></font>"
+                           , $keys[$i], $elems{$keys[$i]});
+           printf "<td align=center width=%d%% bgcolor=#<menu-bgcolor>>%s\n",
+               $width, $foo;
+
+           $i++;
+           if (! ($i % $tabwidth)) {
+               print "</td></tr><p>\n";
+           } else {
+               print "<font size-=5 color=\"#<menu-bgcolor>\"> · </font></td>";
+           }
+       }
+       if ($i % $tabwidth) {
+           do {
+               print "<td bgcolor=#<menu-bgcolor>>&nbsp;</td>";
+               $i++;
+               print "</tr><p>" if (! ($i % $tabwidth));
+           } until (!($i % $tabwidth));
+       }
+       print "</table></center>\n";
+    }
+}
+
+:>
diff --git a/src/index.html.de.wml b/src/index.html.de.wml
new file mode 100644 (file)
index 0000000..2d11a47
--- /dev/null
@@ -0,0 +1,81 @@
+#include <basic.style>
+#include <quote.style>
+#include "index-tools.pl"
+
+<html>
+<head>
+  <title>Infodrom Oldenburg</title>
+  <link rev="made" href="mailto:joey@infodrom.ffis.de" title="Autor">
+  <meta name="author" content="joey@infodrom.north.de (Martin Schulze)">
+  <meta name="description" content=Ïnfodrom Oldenburg ist ein öffentliches Informationssystem.">
+  <meta name="keywords" content="Zeitungen, Publikationen, Infodrom Oldenburg, Joey, Linux, Debian, Netzwerk">
+</head>
+
+<body-tag>
+
+<h1 align=center><font face="Helvetica,Arial">Infodrom Oldenburg</font><hr width=90% align=center></h1>
+
+# Begin warning
+<table width=100% border=2 cellspacing=0 cellpadding=2>
+<tr><th align=center bgcolor=#00ff00>
+<font face="Helvetica,Arial" color=#0000ff>Dieser Server wird komplett neu aufgebaut und ist noch unfertig.</font>
+</th></tr>
+</table><p>
+# End warning
+
+<: main_menu (('Infodrom','Linux','Debian','Linx','Projects')); :>
+
+<p><center><quotebox-de-shtml index-fortune.html></center>
+
+<:
+  %specials = ('zeitungen/'                        => 'Zeitungen',
+              'search.html'                       => 'Suchmaschinen',
+              'special/'                          => 'Specials',
+              'Mail-Archive/'                     => 'Mails',
+              'http://www.ffis.de/'               => 'ffis e.V.',
+              'http://oldenburg.linux.de/'        => 'LUGO',
+              'http://oldenburger.linuxtage.de/'  => 'LinuxTag OL',
+             );
+  specials_menu (\%specials);
+:>
+
+<blockquote><font face="Helvetica,Arial">
+
+    Infodrom Oldenburg ist ein Informationssystem im Verbund des ffis
+    e.V., einem Zusammenschluß von Personen im Raum Weser-Ems, die
+    sich der Förderung Freier Informationen und Software verschrieben
+    haben.  Alle Dienste werden auf nicht-kommerzieller Basis
+    angeboten.
+
+</font></blockquote>
+
+
+<blockquote><font face="Helvetica,Arial">
+    <b>Disclaimer:</b><br>
+
+    Diese Site ist größtenteils nicht zweisprachig.  Die meisten
+    Seiten stehen nur auf Deutsch oder nur auf Englisch zur
+    Verfügung.
+
+</font></blockquote>
+
+<table width=100% border=0>
+<tr>
+  <td align=left valign=top>
+     <a href="http://www.linuxtag.de/"><img src="/gifs/button/lt2kblue.gif" alt="LinuxTag 2000" border=0></a>
+  </td>
+  <td align=right valign=top>
+     <a href="http://www.linux.de/"><img src="/gifs/button/powered_by_linux.gif" alt="Powered by Linux" border=0></a>
+  </td>
+</tr>
+</table>
+
+<page-footer>
+</body>
+</html>
+
+# Local variables:
+# mode: indented-text
+# mode: auto-fill
+# mode: iso-accents
+# end:
diff --git a/src/index.html.en.wml b/src/index.html.en.wml
new file mode 100644 (file)
index 0000000..70b855e
--- /dev/null
@@ -0,0 +1,79 @@
+#include <basic.style>
+#include <quote.style>
+#include "index-tools.pl"
+
+<html>
+<head>
+  <title>Infodrom Oldenburg</title>
+  <link rev="made" href="mailto:joey@infodrom.ffis.de" title="Autor">
+  <meta name="author" content="joey@infodrom.north.de (Martin Schulze)">
+  <meta name="description" content=Ïnfodrom Oldenburg is a public information system.">
+  <meta name="keywords" content="Zeitungen, Publikationen, Infodrom Oldenburg, Joey, Linux, Debian, Netzwerk">
+</head>
+
+<body-tag>
+
+<h1 align=center><font face="Helvetica,Arial">Infodrom Oldenburg</font><hr width=90% align=center></h1>
+
+# Begin warning
+<table width=100% border=2 cellspacing=0 cellpadding=2>
+<tr><th align=center bgcolor=#00ff00>
+<font face="Helvetica,Arial" color=#0000ff>This site is being rebuilt and not yet finished.</font>
+</th></tr>
+</table><p>
+# End warning
+
+<: main_menu (('Infodrom','Linux','Debian','Linx','Projects')); :>
+
+<p><center><quotebox-en-shtml index-fortune.html></center>
+
+<:
+  %specials = ('zeitungen/'                        => 'Newspapers',
+              'search.html'                       => 'Search',
+              'special/'                          => 'Specials',
+              'Mail-Archive/'                     => 'Mails',
+              'http://www.ffis.de/'               => 'ffis e.V.',
+              'http://oldenburg.linux.de/'        => 'LUGO',
+              'http://oldenburger.linuxtage.de/'  => 'LinuxTag OL',
+             );
+  specials_menu (\%specials);
+:>
+
+<blockquote><font face="Helvetica,Arial">
+
+    Infodrom Oldenburg is a public information system within the
+    compound of ffis e.V., a federation of people in the north-western
+    part of Germany, who support Free Information and Software.  All
+    services are provided on a non-commercial Basis.
+
+</font></blockquote>
+
+
+<blockquote><font face="Helvetica,Arial">
+    <b>Disclaimer:</b><br>
+
+    This site mostly is not bilingual.  Most pages are available only
+    in english or only in german.
+
+</font></blockquote>
+
+<table width=100% border=0>
+<tr>
+  <td align=left valign=top>
+     <a href="http://www.linuxtag.org/"><img src="/gifs/button/lt2kblue.gif" alt="LinuxTag 2000" border=0></a>
+  </td>
+  <td align=right valign=top>
+     <a href="http://www.linux.org/"><img src="/gifs/button/powered_by_linux.gif" alt="Powered by Linux" border=0></a>
+  </td>
+</tr>
+</table>
+
+<page-footer>
+</body>
+</html>
+
+# Local variables:
+# mode: indented-text
+# mode: auto-fill
+# mode: iso-accents
+# end: