#!/bin/sh ######################################################################### # # FILE : createScriptTable # DATE : 13.09.2002 # AUTHOR : Patrick Meier / patrick.meier@gmx.net # DESCRIPTION : create an html-table with all script-descriptions and links # # Copyrigth (C) 2001 by Patrick Meier, Switzerland # ######################################################################### PN=`basename "$0"` STARTSTRING="==>" MAINIMAGESPATH="../../" TABLECOLOR="#FFFFCC" EVENROWCOLOR="#CCCCCC" ODDROWCOLOR="#DDDDCC" HEADERFILE="header.html" FOOTERFILE="footer.html" DESCRIPTIONFILE="description.txt" HTMLIDENT="\t" ######################################################################### # Usage ######################################################################### Usage() { echo "$PN - create a table with all script-descriptions" echo "usage: $PN [-p path] [-html] [-tc \"$TABLECOLOR\"] [-erc \"$EVENROWCOLOR\"] [-orc \"$ODDROWCOLOR\"] [-header header.html] [-footer footer.html] filename.csv " >&2 echo "" >&2 echo " -header filename the header of the html-file" >&2 echo " -footer filename the footer of the html-file" >&2 echo " -tc color color of the table (works not by Netscape)" >&2 echo " -erc color even row color of the generated table " >&2 echo " -orc color odd row color of the generated table " >&2 exit 1 } ######################################################################### # ParameterFailed ######################################################################### ParameterFailed() { echo "${STARTSTRING}Parameter faild: $1 ..." >&2 echo "" >&2 Usage } ######################################################################### # getDescription ######################################################################### getDescription() { for j in $@/* do if [ -f "$j" ] && [ "$DESCRIPTIONFILE" != "${j##*/}" ] then description="`cat $j | grep -v "createScriptTable" | grep "DESCRIPTION :" | sed 's/DESCRIPTION ://g;s/# //g;s/#//g;s/" //g'`" echo "${j##*/}: $description" fi done } ######################################################################### # getHTMLStartTable ######################################################################### getHTMLStartTable() { # create table echo "
Script | Description | \n"
echo "
---|
"description"
$description