[CALUG] library script
John L. Cunningham
djohngo at gmail.com
Tue Jul 6 15:30:31 EDT 2010
The redesigned Howard County Public Library site is too pointy-clicky
for my taste. Therefore, I have written a rudementary bash script that
allows me to search the catalog from the command line.
--- BEGIN hcllookup.sh ---
#!/bin/bash
OPTION="$1"
shift
SEARCH_TERM="$*"
case "$OPTION" in
-a)
firefox --new-tab "http://polaris.hclibrary.org/polaris/search/searchresults.aspx?ctx=1.1033.0.0.6&type=Advanced&term=$SEARCH_TERM&term2=&term3=&term4=&by=AU&by2=KW&by3=KW&by4=KW&bool1=And&bool2=And&bool3=And&limit=TOM=*&sort=RELEVANCE&page=0"
;;
-i)
firefox --new-tab "http://polaris.hclibrary.org/polaris/search/searchresults.aspx?ctx=1.1033.0.0.6&type=Advanced&term=$SEARCH_TERM&term2=&term3=&term4=&by=ISBN&by2=KW&by3=KW&by4=KW&bool1=And&bool2=And&bool3=And&limit=TOM=*&sort=RELEVANCE&page=0"
;;
-t)
firefox --new-tab "http://polaris.hclibrary.org/polaris/search/searchresults.aspx?ctx=1.1033.0.0.6&type=Advanced&term=$SEARCH_TERM&term2=&term3=&term4=&by=TI&by2=KW&by3=KW&by4=KW&bool1=And&bool2=And&bool3=And&limit=TOM=*&sort=RELEVANCE&page=0"
;;
*)
printf "Usage: hcllookup [OPTION] [SEARCH TERM(S)...]\n\t-a, Author\n\t-i, ISBN\n\t-t, Title\n"
;;
esac
--- END hcllookup.sh ---
John
More information about the CALUG
mailing list