#!/bin/csh
# file: ads-name-new = get a new author into my ADS collection
# init: Oct 30 2019  Rob Rutten  Deil
# last: Nov 22 2020  Rob Rutten  Deil

# display instruction
echo ===== example: ads-name-new  rutten-rob  '=author:"Rutten, Robert J."'
echo ===== the prefix = implies strict, usually do not use 
sleep 4
  
# help response if no input parameter
if ($#argv == 0) then 
  echo ===== ads-name-new  rutten-rob  '=author:"Rutten, Robert J."'
  exit
endif

# set variable
setenv author `basename $1:gr`   # takes off ./ and .txt if there

# write searsch string in dir namestrings
echo $2 > ~/rr/www/bibfiles/ads/namestrings/$author

# get abs, bib, solabs for this name
## cd ~/rr/www/bibfiles/ads/abs #RR not needed?
ads-name-get $author
## back

# run make_ads_publist as check on hanging (not done by ads-name-get)
cdprintbib
make_ads_publist $author
back

# display result
ev ~/rr/www/bibfiles/ads/publists/$author.pdf

