URLToys Tutorial
Introduction (Continued)
We've succeeded! We now have a list of every file from this site that we want to download (5 images). To get these files, the command we use is ... [drum roll] ... get. I can tell that these commands are going to be tough to remember.
URLToys(5)>get
Downloading "http://urltoys.gotdoofed.com/coolpictures/picture1.jpg"...
[*************************] (1418 of 1418)
Downloading "http://urltoys.gotdoofed.com/coolpictures/picture2.jpg"...
[*************************] (1418 of 1418)
Downloading "http://urltoys.gotdoofed.com/coolpictures/picture3.jpg"...
[*************************] (1418 of 1418)
Downloading "http://urltoys.gotdoofed.com/coolpictures/picture4.jpg"...
[*************************] (1418 of 1418)
Downloading "http://urltoys.gotdoofed.com/coolpictures/picture5.jpg"...
[*************************] (1418 of 1418)
URLToys (5)>
Watch in awe as URLToys downloads these massive, 1.4K files to your hard drive. If you have anything other than dial-up, this part should almost flash by. You've succeeded in downloading your first files in URLToys! If you are in a Unix Variant, these files will be located in the current directory, otherwise (for Windows users) they'll be in the directory that you installed URLToys to (most likely C:\Program Files\URLToysPerlSA).
If you look in the directory, you'll see a new subdirectory, named "00000". You will also see a file named "nextdir.txt", which contains a single number inside (a "1"). This is how URLToys keeps track of future downloads, and organizes multiple downloads. The 00000 folder has the 5 files you want, prepended with "0000n-", just in case you download 5000 "1.jpg" files. There is also a file named "url_list", which is the list of links to the files you downloaded in this directory. This file is necessary if you ever want to stop a download halfway and resume it later (see the resume command in the documentation), otherwise it can be disabled with the set SaveURLList command (see docs).
The real power of URLToys is when you can do a pattern something like this:
1. Make a list (using make).
2. Filter out junk links.
3. Repeat step 1.
Eventually you'll end up with a huge, filtered list of links, preferably keeping the ones you want to download. Then those files are just a get away. Other quick commands to remember, just to get you started (READ THE DOCUMENTATION!):
- nodupes: Removes all duplicate links from a list (super-useful)
- nsort: Sorts the list alphabetically, but takes care to mind the last number in the URL for sorting numbered links
- help: Lists all possible commands (!!) Very helpful for quick reminders.
This is the end of the first tutorial. Hope it helped out a little bit! Please check back to the site for future tutorials, tips and tricks. To see the entire URLToys conversation from the tutorial, click here.
[Tutorial #2 begins here.]
|