#!/bin/csh -f # # Create the calendar.html file from the calendar.tbl file. # # Brent Chivers 2004/Sep/25 ##! /bin/csh -fb # for setuid/setgid scripts (tsk) # set verbose # see commands before variable substitution # set echo # see commands after variable substitution unset histchars # get other users' history characters out of the way unalias * # get other users' .cshrc stuff out of the way ## set nonomatch # don't require wildcard matches if ($#argv == 0) then # no arguments provided, use default calendar.tbl set files = ~/personal/calendar/calendar.tbl else set files = ( $* ) endif # change BS underlining to HTML italics # remove adjacent italics off/on sequences # use awk.calendar to convert to HTML.... # put a space after a comma # put a space before a capital letter (around stuff also) # put a space before a dollar sign # take out space after Mc Whatever or in NoVA cat $files | sed -e 's=\(_\)\(.\)=\2=g' -e 's===g' -e 's= *= =g' | awk.calendar | sed -e 's/\([,;]\)\([A-Za-z0-9$(]\)/\1 \2/g' -e 's/\([a-z]\)\([A-Z]\)/\1 \2/g' -e 's/\([a-z]\)\([A-Z]\)/\1 \2/g' -e 's/\([a-z]\)<\/i>\([A-Z]\)/\1<\/i> \2/g' -e 's/\([A-Za-z0-9),;]\)\(\$\)/\1 \2/g' -e 's/\(Ma*c\) \([A-Z]\)/\1\2/g'