[CALUG] library script

Matt Fisher spimattfisher at gmail.com
Tue Jul 6 15:39:53 EDT 2010


And I am transported back 1992  when I would use my WAN account to gopher
CARL.  Mkay poor choice of words ..do a  cli search of the uny of colorado

On Jul 6, 2010 3:33 PM, "John L. Cunningham" <djohngo at gmail.com> wrote:

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

_______________________________________________
CALUG mailing list
CALUG at unknownlamer.org
http://lists.unknownlamer.org/listinfo/calug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.unknownlamer.org/pipermail/calug/attachments/20100706/eefddadf/attachment.htm 


More information about the CALUG mailing list