#!/bin/tcsh -f #(ie run the tshell on this but don't read the .cshrc or .tcshrc) set ver = "version = 1.01 of yvph 2007 Nov 01" # 2007 Nov 01, 1.01: modify ayvp to produce pure html # 2007 Sep 1, 1.00: origin if ($#argv < 1) then echo "$ver" echo echo 'usage: yvph [year] [volume] [page] > my.html' echo ' or ' echo ' yvph [volume] [page] > my.html' echo ' or ' echo ' yvph [year] [volume] [page] [another key] > my.html' echo echo 'Find article with given year/volume/page in PubMed' echo "by using yvp to create an html file." echo "If yvp doesn't automatically go to the page," echo "point your browser to the file and click the link given." echo echo "Example:" echo " yvph 1986 188 415 > my.html" echo echo "Documentation:" echo "http://www.ccrnp.ncifcrf.gov/~toms/yvp.html" echo echo "Dr. Thomas D. Schneider" echo "National Institutes of Health" echo "National Cancer Institute" echo "Center for Cancer Research Nanobiology Program" echo "Molecular Information Theory Group" echo "Frederick, Maryland 21702-1201" echo "toms@ncifcrf.gov" echo "permanent email: toms@alum.mit.edu" echo "http://www.ccrnp.ncifcrf.gov/~toms/" exit endif # output of yvp: set tmp1 = /tmp/`whoami`-1.ayvp # html file being created: set tmp2 = /tmp/`whoami`-2-`tomdate '-'`.ayvp echo -n "" > $tmp2 echo '' >> $tmp2 echo "$ver" >> $tmp2 echo '

' >> $tmp2 echo 'Click this link to get the PubMed entry for:
' >> $tmp2

if ($#argv == 2) then
#  yvp $1 $2 | tee -a $tmp1
  yvp $1 $2 > $tmp1
  echo "year:   $1" >> $tmp2
  echo "volume: $2" >> $tmp2
endif

if ($#argv == 3) then
#  yvp $1 $2 $3 | tee -a $tmp1
  yvp $1 $2 $3 > $tmp1
  echo "year:   $1" >> $tmp2
  echo "volume: $2" >> $tmp2
  echo "page:   $3" >> $tmp2
endif

if ($#argv == 4) then
#  yvp $1 $2 $3 $4 | tee -a $tmp1
  yvp $1 $2 $3 $4 > $tmp1
  echo "year:   $1" >> $tmp2
  echo "volume: $2" >> $tmp2
  echo "page:   $3" >> $tmp2
  echo "key:    $4" >> $tmp2
endif

echo '
' >> $tmp2 #echo --- set url = "`tail -1 $tmp1`" # echo "$url" #echo --- echo '> $tmp2 #echo hi there echo ">$url" >> $tmp2 echo '' >> $tmp2 #echo --- cat $tmp2