in reply to Re: Downloading a range of sequential files
in thread Downloading a range of sequential files

Specifying precision - good idea. Thanks!

As far as suffix being automatically determined, what I had didn't actually work very well since any file that didn't end in a number would cause a script error. I've since added in automatic detection and a die to gracefully catch non-numeric filenames. Most of the files I'm listing end in numbers anyway, so it wasn't that big a problem for me. Eventually I'm planning to implement a switch (--activenumber="3" or something like that) that allows me to specify the number to increment / decrement (in case of filenames like "results-2000-01-25-final.html").

One of my design goals with this was to make it as automagic as possible - I'm lazy so I want to be able to just copy and paste the URLs, add parameters to the end and hit enter.

--
Grant me the wisdom to shut my mouth when I don't know what I'm talking about.

Replies are listed 'Best First'.
Re: Re: Re: Downloading a range of sequential files
by revdiablo (Prior) on Aug 06, 2003 at 23:55 UTC

    Note that my paramater order was designed to be done as lazily as possible too. Using your example, say I had the url http://foobar.com/results-2000-01-25-final.html and I wanted to get 2000-01-25 through 2000-01-28. My sequence of operations would go something like so.

    First I would type the command:

    wget `urlrange `

    Then paste the url:

    wget `urlrange http://foobar.com/results-2000-01-25-final.html`

    And finally all I have to do is move my cursor over to the 25, add a space before and after, and put the last digit of my range. My result would be something like:

    wget `urlrange http://foobar.com/results-2000-01- 25 28 -final.html`

    Which, I would say, is about as lazy as it can get (in terms of number of keystrokes). But... to each his own, I suppose. Your interface seems to work fine for you.

      Cursoring around in shell windows makes me insane. Heh...

      --
      Grant me the wisdom to shut my mouth when I don't know what I'm talking about.