home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-05-10 | 1.5 KB | 48 lines | [TEXT/ToyS] |
- -- Change these to specify your prefered Umich & Info-Mac FTP sites.
- -- Don't use the home sites, as they are already overloaded.
- set umichaddr to "archie.au:/micros/mac/umich/"
- set infomacaddr to "archie.au:/micros/mac/info-mac/"
- -- Set this to the path to your download file that lists the files to fetch
- set theinput to "rocky:desktop folder:download"
-
- set quitanarchie to false
-
- set thedata to readtext file theinput
-
- copy thedata & return to thedata
- set newdata to ""
- set i to 1
- repeat while i ≤ (the number of paragraphs of thedata)
- set theurl to paragraph i of thedata
- if length of theurl > 0 then
- set keepit to true
- if (theurl contains " /info-mac") and (theurl contains ";") then
- copy ((characters (offset of "/info-mac" in theurl) thru ¬
- ((offset of ";" in theurl) - 1) of theurl) as string) to theurl
- end if
- if (theurl does not contain ":") and (theurl starts with "/mac/") then
- copy umichaddr & text from character 6 of theurl to end of theurl to theurl
- end if
- if (theurl does not contain ":") and (theurl starts with "/info-mac/") then
- copy infomacaddr & text from character 11 of theurl to end of theurl to theurl
- end if
- if theurl contains ":" then
- tell application "Anarchie"
- set quitanarchie to true
- with timeout of 3600 seconds
- set err to fetch url theurl expand with "blah"
- set keepit to (err is not 0)
- end timeout
- end tell
- end if
- if keepit then
- copy (newdata & (paragraph i of thedata) & return) to newdata
- end if
- end if
- set i to i + 1
- end repeat
-
- writetext file theinput data newdata
-
-
-