#!/bin/csh -f if ( -f mod/$1-$2-more.html) then echo file mod/$1-$2-more.html exists exit endif if ( $1 != '' ) then #goto index echo getting images for $1-$2 grep -i ${1} nameslist | grep -i ${2} | tr / ' ' | awk '{print("\\ls "$1"/"$2"/"$3"/"$3".png")}' | csh -f > ${1}${2}pngs setenv pngs `cat ${1}${2}pngs | head -1` echo $pngs if ( ${pngs} == '' ) then echo ${1} ${2} not found exit else echo -n ${1}${2}pngs:" " && wc -l ${1}${2}pngs endif echo "${1} ${2} Molecules@GNU-Darwin.org Structural Archive and Gallery" > ${1}-${2}-more.html echo "

${1} ${2} Molecules Structural Archive and Gallery

" >> ${1}-${2}-more.html cat ${1}${2}pngs | tr / ' ' | awk '{print("echo -n . > /dev/tty && echo \"
\" && cat "$1"/"$2"/"$3"/names && echo \"

pdb file: "$3".pdb
sdf file: "$3".sdf
directory: "$3"

\"")}' | csh -f >> ${1}-${2}-more.html echo echo making MOD and RSS ~/grabHtmlHeader ${1}-${2}-more.html ; ~/insertSidebar2 ${1}-${2}-more.html echo "http://molecules.gnu-darwin.org/mod/$1-$2-more.html" mv ${1}-${2}-more.html mod && rm ${1}*${2}* && cd mod && ~/webindex.pl && ~/grabHtmlHeader index.html && \ ~/insertSidebar2 index.html && source ../makeRSS && cd ../ echo not making Indices #index: # grep -i ${1} nameslist | grep -i ${2} | \ # tr -s ' ' | tr -d ')' | tr -d '(' | tr -d '[' | tr -d ']' | sed s/' -'/' '/ | sed s/' -'/' '/| sed s/' -'/' '/ | tr -s ' ' | tr -d '*' | tr -d '\"' | tr -d "\'" | \ # sed s/' '/' \"'/ | sed s/^/'source makeHtmlIndex '/ | sed s/'$'/'\"'/ | csh -f else echo argument required endif