/[safari]/get_book.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /get_book.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by dpavlin, Thu Jun 17 19:43:24 2004 UTC revision 1.12 by dpavlin, Wed Jul 21 13:58:35 2004 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2    
3  # proxy settings (same as in firebird)  # proxy settings (same as in firebird)
4  fping -q proxy && export http_proxy=http://proxy:8080 ||  fping -q proxy && export http_proxy=http://proxy:8080
5  fping -q proxy.lan && export http_proxy=http://proxy.lan:8080  if [ -z "$http_proxy" ] ; then
6            fping -q proxy.lan && export http_proxy=http://proxy.lan:8080
7    fi
8  # user agent (same as in firebird)  # user agent (same as in firebird)
9  ua="Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040506 Firefox/0.8"  ua="Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040506 Firefox/0.8"
10  cookie_file="cookie.txt"  cookie_file="cookie.txt"
# Line 83  function geturl() { Line 85  function geturl() {
85                  -e 's/#.*$//' \                  -e 's/#.*$//' \
86                  -e 's/\&srchText=//' \                  -e 's/\&srchText=//' \
87                  -e 's/open=false/open=true/' | \                  -e 's/open=false/open=true/' | \
88                  grep '&s=1&b=1&f=1&t=1&c=1&u=1&r=&o=1' | \                  grep '&s=1&b=1&f=1&t=1&c=1&u=1&r=&o=1&n=1&d=1&p=1&a=0' | \
89                  grep -i "xmlid=[0-9A-Za-z\-][0-9A-Za-z\-]*" | \                  grep -i "xmlid=[0-9A-Za-z\-][0-9A-Za-z\-]*" | \
90                  grep -vi "xmlid=[0-9A-Za-z\-]*/[0-9][0-9][0-9][0-9][0-9][0-9][0-9]" | \                  grep -vi "xmlid=[0-9A-Za-z\-]*/[0-9][0-9][0-9][0-9][0-9][0-9][0-9]" | \
91                  sort -u >> in                  sort -u >> in
# Line 91  function geturl() { Line 93  function geturl() {
93    
94  function uniqurl() {  function uniqurl() {
95          mv in in.tmp          mv in in.tmp
96          grep -v 'view=[A-Z]' in.tmp | sort -u > in          grep -v 'view=[A-Z]' in.tmp | grep 'a=0$' | sort -u > in
97          grep 'view=[A-Z].*/index' in.tmp | sort -u >> in          grep 'view=[A-Z].*/index' in.tmp | grep 'a=0$' | sort -u >> in
98          links=`wc -l in | cut -d" " -f1`          links=`wc -l in | cut -d" " -f1`
99          echo "found $links unique links"          echo "found $links unique links"
100  }  }

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.26