/[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.2 by dpavlin, Sun Dec 14 22:27:18 2003 UTC revision 1.3 by dpavlin, Mon Dec 15 00:26:57 2003 UTC
# Line 43  function uniqurl() { Line 43  function uniqurl() {
43          grep 'view=[A-Z].*/index' in.tmp | sort -u >> in          grep 'view=[A-Z].*/index' in.tmp | sort -u >> in
44  }  }
45    
46    function checklogin() {
47            if grep 'promo.asp' index.html* >/dev/null ; then
48                    echo "WARNING: safari seems to logunt you as user. Aborting."
49                    exit 1
50            fi
51    }
52    
53  echo > in  echo > in
54  mirror "http://safari.oreilly.com/?XmlId=$isbn"  mirror "http://safari.oreilly.com/?XmlId=$isbn"
55    
# Line 51  geturl "index.html?XmlId=$isbn" $isbn Line 58  geturl "index.html?XmlId=$isbn" $isbn
58  uniqurl  uniqurl
59    
60  mirror "-i in"  mirror "-i in"
61    checklogin
62    
63  echo -n "extracting URLs [1]"  echo -n "extracting URLs [1]"
64  ls index.html* | while read file ; do  ls index.html* | while read file ; do
# Line 62  echo Line 70  echo
70  uniqurl  uniqurl
71    
72  mirror "-i in"  mirror "-i in"
73    checklogin
74    
75  echo > in  echo > in
76  echo -n "extracting URLs [2]"  echo -n "extracting URLs [2]"
# Line 73  done Line 82  done
82  uniqurl  uniqurl
83    
84  mirror "-i in"  mirror "-i in"
85    checklogin
86    
87  # convert links in html  # convert links in html
88  bn=`basename $0`  bn=`basename $0`

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.26