############################################################################# # Do_titles # ############################################################################# #!/bin/csh unalias ls set topdir = '/usr/people/www/slides' set thedir = $topdir source Do_titles23 set dirlist1 = `ls $topdir` foreach dir1 ($dirlist1) if -d $topdir/$dir1 then echo $dir1 set thedir = $topdir/$dir1 source Do_titles23 set dirlist2 = `ls $topdir/$dir1` foreach dir2 ($dirlist2) if -d $topdir/$dir1/$dir2 then echo ' '$dir2 set thedir = $topdir/$dir1/$dir2 source Do_titles23 endif end endif end ############################################################################# # Do_titles23 # ############################################################################# if -e $thedir/.dirtitles then rm $thedir/.dirtitles endif set dirlist = `ls $thedir` foreach dir ($dirlist) if -d $thedir/$dir then echo $dir $dir >> $thedir/.dirtitles echo '--> '$dir endif end if -e $thedir/.filetitles then rm $thedir/.filetitles endif set filelist = `ls $thedir/*.ps` foreach file ($filelist) set filer = $file:r if -e $filer.title then set title = `cat $filer.title` echo $filer:t $title >> $thedir/.filetitles else echo $filer:t $filer:t >> $thedir/.filetitles endif end ############################################################################# # Do_find # ############################################################################# #!/bin/csh # set thepath = `pwd` set thepath = '/usr/people/www/GW_slides' cd $thepath find $thepath -name '*.ps' -mtime -5 -exec $thepath/Do_cutlink {} \; find $thepath -name '*.ps' -mtime -5 -exec ps_gif {} \; find $thepath -name '*.gif' -mtime -5 -exec $thepath/Do_html {} \; find $thepath -name '*.ps' -mtime -5 -exec $thepath/Do_check_gif {} \; $thepath/Do_www tar cvf GW_slides.tar muons.html find $thepath -mtime -5 \( -type f -o -type l \) \ -exec tar Luvf GW_slides.tar {} \; ############################################################################# # Do_cutlink # ############################################################################# #!/bin/csh mv $1 `echo $1 | sed -n s/link_to_//p` echo `echo $1 | sed -n s/link_to_//p` ############################################################################# # ps_gif # ############################################################################# #!/bin/csh convert -page 620x850 -crop 0x0 -bordercolor white -border 10x10 $1 $1:r.gif ############################################################################# # Do_html # ############################################################################# #!/bin/csh unalias ls set thepath = "$1:h" set html = $1:r.html set fname = $1:t set base = $fname:r set ps = $base.ps set gif = $base.gif set longtitle = `fgrep $base $thepath/.filetitles | head -1` if (${#longtitle} > 1) then set title = "$longtitle[2-]" else set title = "$base" echo "No entry for $gif in $thepath/.filetitles " endif set lsgif = `ls -l -L $thepath/$gif` set lsps = `ls -l -L $thepath/$ps` echo $html echo '' >$html echo ''$title'' >>$html echo '' >>$html echo "

$title

" >>$html if -e "$thepath/$ps" then echo 'PostScript file ('$lsps[5]' bytes)
'>>$html else echo "$thepath/$ps does not exist " endif if -e "$thepath/$gif" then echo 'external gif viewer ('$lsgif[5]' bytes)' >>$html endif echo '

' >>$html if -e "$thepath/../../GrzegorzWrochna.html" then echo '


GW' >>$html else echo '
GW' >>$html endif echo '' >>$html echo '' >>$html ############################################################################# # Do_checkgif # ############################################################################# #!/bin/csh unalias ls set thepath = "$1:h" set fname = $1:t set base = $fname:r set ps = $base.ps set gif = $base.gif if -e "$thepath/$gif" then else echo "$thepath/$gif does not exist " endif ############################################################################# # Do_www # ############################################################################# #!/bin/csh unalias ls set topdir = '/usr/people/www/GW_slides' set html1 = "$topdir/GW_slides.html" echo '' >$html1 echo 'CMS slides' >>$html1 echo '' >>$html1 echo '

CMS slides


' >>$html1 echo >>$html1 set dirlist1 = `awk '{print $1}' $topdir/.dirtitles` foreach dir1 ($dirlist1) if -d $topdir/$dir1 then set longtitle = `fgrep $dir1 $topdir/.dirtitles | head -1` set title = "$longtitle[2-]" echo '

'$title'

' >>$html1 echo '' >>$html1 echo >>$html1 end echo '' >>$html1 echo '
GW' >>$html1 echo '' >>$html1 echo '' >>$html1 #############################################################################