Initial files
authorJoey Schulze <joey@infodrom.org>
Wed, 5 Sep 2001 08:50:47 +0000 (08:50 +0000)
committerJoey Schulze <joey@infodrom.org>
Wed, 5 Sep 2001 08:50:47 +0000 (08:50 +0000)
12 files changed:
Makefile [new file with mode: 0644]
Styles/basic.style [new file with mode: 0644]
Styles/colors.style [new file with mode: 0644]
Styles/infodrom.style [new file with mode: 0644]
Styles/service.style [new file with mode: 0644]
Styles/tools.style [new file with mode: 0644]
bin/fixsuffix [new file with mode: 0755]
bin/wmldepend.sh [new file with mode: 0755]
src/Infodrom/functions.inc [new file with mode: 0644]
src/Makefile [new file with mode: 0644]
src/index.wml [new file with mode: 0644]
src/submenu.inc [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..46c82d9
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,48 @@
+hostname=$(shell hostname)
+
+ifeq ($(hostname),finlandia)
+DEST = $(HOME)/public_html/new/service
+else
+ifeq ($(hostname),luonnotar)
+DEST = /var/www/service.infodrom.org
+endif
+endif
+
+FILES = --exclude "CVS/" --exclude "*imgdot-1x1-transp.gif" --include "*/"
+FILES+= --include "*.jpg" --include "*.html" --include "*.shtml" --include "*.php3" --include "*.gif"
+FILES+= --include "*.png"
+ifeq ($(hostname),luonnotar)
+FILES+= --include .htaccess
+endif
+FILES+= --exclude "*"
+
+build:
+       cd src && make all
+
+ifeq ($(hostname),finlandia)
+test:
+       test -d $(TEST) || mkdir -p $(DEST)
+       rsync -lptr $(FILES) src/ $(DEST)/
+#      cd src && for f in *.html; do cp $$f $(TEST)/$$f; done
+endif
+
+fix:
+#       for f in src/index.*.php3; do \
+#         sed '1,/width="40"/ s/width="40"/width="250"/' < $$f > tmp; \
+#         mv -f tmp $$f; \
+#         sed '1,/width="40"/ s/width="40"/width="400"/' < $$f > tmp; \
+#         mv -f tmp $$f; \
+#       done
+
+install: fix
+       test -d $(DEST) || mkdir -p $(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
+
+depend:
+       cd src && make rdepend
diff --git a/Styles/basic.style b/Styles/basic.style
new file mode 100644 (file)
index 0000000..7c1c4e0
--- /dev/null
@@ -0,0 +1,37 @@
+#include <colors.style>
+
+# <imgdot-fname>
+#      Insert the filename for the imgdot file
+#
+# <page-footer>
+#      Compute the page footer
+
+# ========== Abstand berechnen ==========
+# in ePerl: $root_prefix
+# in WML: <get-var root_prefix>
+<:
+  $root_prefix = "<get-var WML_SRC_DIRNAME>";
+  $root_prefix =~ s/^.*src\/?(.*)$/$1/;
+  @foo = split (/\//, $root_prefix);
+  $root_prefix = "../"x($#foo+1);
+:>
+<if <not <get-var root_prefix>>
+  <define-tag root_prefix><: print "$root_prefix"; :></define-tag>
+  "<: $root_var = \"<get-var root_prefix>\"; :>"
+>
+
+<define-tag imgdot-fname whitespace=delete>
+<root_prefix>pix/imgdot-1x1-transp.gif
+</define-tag>
+
+<define-tag page-footer>
+<hr><address><font face="Helvetica,Arial"><small>&copy; <a href="http://www.infodrom.org/~joey/">Joey</a>, <:
+@months =
+    ("Dummy", "January", "February", "March", "April", "May", "June",
+       "July", "August", "September", "October", "November", "December");
+
+"<get-var WML_SRC_ISOTIME>" =~ /^(\d+)-(\d+)-(\d+)\s/;
+
+printf "Last modified: %s %d, %d", $months[$2], $3, $1;
+:></small></font></address>
+</define-tag>
diff --git a/Styles/colors.style b/Styles/colors.style
new file mode 100644 (file)
index 0000000..cf11aea
--- /dev/null
@@ -0,0 +1,2 @@
+<define-tag white>ffffff</define-tag>
+<define-tag black>000000</define-tag>
diff --git a/Styles/infodrom.style b/Styles/infodrom.style
new file mode 100644 (file)
index 0000000..be0899e
--- /dev/null
@@ -0,0 +1,11 @@
+<define-tag page-bgcolor>f7f7f7</define-tag>
+<define-tag page-textcolor><black></define-tag>
+<define-tag page-vlink>000090</define-tag>
+<define-tag page-alink>e709f7</define-tag>
+<define-tag page-link>1717ef</define-tag>
+<define-tag submenu-bgcolor>abdcfc</define-tag>
+<define-tag submenu-textcolor>0000ff</define-tag>
+<define-tag bar-bgcolor>1aa2fe</define-tag>
+<define-tag bar-textcolor><white></define-tag>
+
+#include <service.style>
diff --git a/Styles/service.style b/Styles/service.style
new file mode 100644 (file)
index 0000000..7879e85
--- /dev/null
@@ -0,0 +1,65 @@
+#include <basic.style>
+#include <tools.style>
+
+# <page [title=] [func=]>
+#      Define the actual page
+#
+#      title=  title for the page, default: "Infodrom Service"
+#      func=   Function of the page, left bar
+
+<define-tag page endtag=required>
+<preserve title func>
+<set-var %attributes>
+
+<if <not <get-var title>>
+    <set-var title="Infodrom Service">>
+
+<html>
+<head>
+<title><get-var title></title>
+<meta name="author" content="joey@infodrom.org (Martin Schulze)">
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+<body bgcolor="#<page-bgcolor>" text="#<page-textcolor>" vlink="#<page-vlink>" alink="#<page-alink>" link="#<page-link>">
+
+<table width=100% border=0 cellpadding=0 cellspacing=0>
+<tr>
+<td align=left valign=top width=10% bgcolor=#<submenu-bgcolor>><font face="Helvetica,Arial" size=-1 color="#<submenu-textcolor>">
+
+<table width=100% border=0 cellpadding=1 cellspacing=0 bgcolor=#<white>>
+<tr><td align=left valign=top>
+<img src=<root_prefix>pix/infocon-90.png alt=""><p>
+</td></tr></table><p>
+
+#include "submenu.inc"
+
+<p>
+</font></td>
+
+<td valign=top><img src=<root_prefix>pix/imgdot-1x1-transp.gif width=3 height=0 alt=""></td>
+
+<td valign=top align=left width=90%><font face="Helvetica,Arial">
+
+<table width=100% border=0 cellpadding=1 cellspacing=0 bgcolor=#<bar-bgcolor>>
+<tr>
+<td align=left><font face="Helvetica,Arial" color=#<bar-textcolor>>
+&nbsp;<strong><get-var func></strong>
+</font></td>
+<td align=right><font face="Helvetica,Arial" color=#<bar-textcolor>>
+<strong>Infodrom Service</strong>&nbsp;
+</font></td>
+</tr>
+</table>
+
+%body
+
+</font></td>
+</tr>
+</table>
+
+<page-footer>
+</body>
+</html>
+
+<restore title function>
+</define-tag>
diff --git a/Styles/tools.style b/Styles/tools.style
new file mode 100644 (file)
index 0000000..a53cfdf
--- /dev/null
@@ -0,0 +1,46 @@
+# <line [width=] [height=] [color=]>
+#      Insert a horizontal line
+#
+#      width   width of the line, either percent or absolute, default: 100%
+#      height  height of the line, in pixels, default: 1
+#      color   color of the line, default: <bar-bgcolor>
+#
+# <menu-item base= text= [href=]>
+#      Create a menu item for the submenu on the left side
+#
+#      base=   basename of the file, i.e. foo if it is foo.wml actually
+#      text=   text for the menu item
+#      href=   optional link, required for .php3, default: base.html
+
+<define-tag line>
+<preserve width height color>
+<set-var %attributes>
+
+<if <not <get-var width>>
+    <set-var width="100%">>
+<if <not <get-var height>>
+    <set-var height="1">>
+<if <not <get-var color>>
+    <set-var color="<bar-bgcolor>">>
+
+<table width=<get-var width> cellpadding=0 cellspacing=0 bgcolor=#<get-var color>>
+<tr><td><img src=<imgdot-fname> alt="" width=1 height=<get-var height>></td></tr></table>
+
+<restore width height color>
+</define-tag>
+
+<define-tag menu-item whitespace=delete>
+<preserve base href text>
+<set-var %attributes>
+
+<if <not <get-var href>>
+    <set-var href="<get-var base>.html">>
+
+<ifneq <get-var WML_SRC_BASENAME> "<get-var base>"
+  <a href="<get-var href>"><get-var text></a>
+  <get-var text>
+>
+
+<restore base href text>
+</define-tag>
+
diff --git a/bin/fixsuffix b/bin/fixsuffix
new file mode 100755 (executable)
index 0000000..e639d8b
--- /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 '<?' $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..606e6c0
--- /dev/null
@@ -0,0 +1,68 @@
+#!/bin/sh
+
+INCPATH=.
+FILES=''
+
+expandfile() {
+       for i in $INCPATH
+       do
+               if [ -f $i/$1 ] 
+               then
+                       echo $i/$1
+                       exit 0
+               fi
+       done
+       echo "Error: Include file \`$1' does not exist" > /dev/stderr
+#      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` \
+                        `sed -n 's/^#[Rr][Ee][Aa][Dd] *[<"]\([^>"]*\).*/\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
+
+addmenu() {
+       root_prefix=`perl -MCwd -e '$_ = cwd;s/^.*src\/?//;@f=split /\//;$n=$#f+1;print "../"x $n;'`
+       menu_prefix=${root_prefix##../}
+
+       if [ -f ${menu_prefix}menu.def ]
+       then
+               echo ' \'
+               echo -n ' '${menu_prefix}menu.def
+       fi
+}
+
+export INCPATH
+export FILES
+
+for i in $FILES
+do
+       echo -n `echo $i | sed 's/.wml/.html/'`: $i
+       findincludes $i
+       addmenu
+       echo
+done
diff --git a/src/Infodrom/functions.inc b/src/Infodrom/functions.inc
new file mode 100644 (file)
index 0000000..793247a
--- /dev/null
@@ -0,0 +1,9 @@
+<p><strong>Functions</strong><br>
+
+&nbsp;<a href="$(prefix)account/">Konto</a><br>
+&nbsp;<a href="$(prefix)account/">Telefon</a><br>
+&nbsp;<a href="$(prefix)account/">Members</a><br>
+&nbsp;<a href="$(prefix)account/">Poster</a><br>
+&nbsp;<a href="$(prefix)account/">Todo</a><br>
+&nbsp;<a href="$(prefix)account/">Linx</a><br>
+
diff --git a/src/Makefile b/src/Makefile
new file mode 100644 (file)
index 0000000..3332e05
--- /dev/null
@@ -0,0 +1,42 @@
+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\(-ffffff\)\?\.gif":"$(ROOT_PREFIX)pix/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 && make -C $$d all); fi; done
+
+dir: $(FILES)
+
+clean:
+       -rm -f $(FILES) $(SFILES) $(PFILES) .depend *.imgdot-1x1-transp.gif imgdot-1x1-transp.gif imgdot-1x1-transp-ffffff.gif
+       -rm -f *~
+       test -z "$(DIRS)" || for d in "" $(DIRS); do if [ -n "$$d" ]; then (cp Makefile $$d && make -C $$d clean); fi; done
+       test -z "$(ROOT_PREFIX)" || rm -f Makefile
+
+install:
+       make -C $(ROOT_PREFIX).. install
+
+test:
+       make -C $(ROOT_PREFIX).. test
+
+depend .depend:
+       $(ROOT_PREFIX)../bin/wmldepend.sh $(IFLAGS) $(WML_FILES) > .depend
+
+rdepend:
+       make depend
+       test -z "$(DIRS)" || for d in "" $(DIRS); do if [ -n "$$d" ]; then (cp Makefile $$d && make -C $$d rdepend); fi; done
+
+include .depend
diff --git a/src/index.wml b/src/index.wml
new file mode 100644 (file)
index 0000000..89f6c9d
--- /dev/null
@@ -0,0 +1,32 @@
+<define-tag page-bgcolor>f7f7f7</define-tag>
+<define-tag page-textcolor><black></define-tag>
+<define-tag page-vlink>000090</define-tag>
+<define-tag page-alink>e709f7</define-tag>
+<define-tag page-link>1717ef</define-tag>
+<define-tag submenu-bgcolor><white></define-tag>
+<define-tag submenu-textcolor>0000ff</define-tag>
+<define-tag bar-bgcolor>1aa2fe</define-tag>
+<define-tag bar-textcolor><white></define-tag>
+
+#include <service.style>
+
+<page title="Welcome to service.infodrom.org" func="Main Menu">
+
+<p>This site acomplishes the need for maintenance of several web
+sites and internal or external projects.  The system is hosted on
+a server in a colo in Hamburg, Germany.
+
+<h3>Workplaces</h3>
+
+<p><ul>
+<li> <a href="Infodrom/">Infodrom Oldenburg</a>
+<li> <a href="LTOL/">Oldenburger LinuxTage</a>
+</ul>
+
+</page>
+
+# Local variables:
+# mode: html
+# mode: auto-fill
+# mode: iso-accents
+# end:
diff --git a/src/submenu.inc b/src/submenu.inc
new file mode 100644 (file)
index 0000000..e69de29