Closed mdsumner closed 7 years ago
Just on the "recursive" thing - you probably always want recursive, so that wget creates the directory structure (see README). For a single file you can either do what you've done (point the source_url
to the directory and restrict to the file you want by the accept
or accept-regex
flags), or could just point the source_url
directly to the file. The former is probably better, because it's more obvious that the results are being filtered and other users can see more easily how to get different formats, should they want them.
Couple of other gotchas: accept
only applies to the file name, whereas accept-regex
applies to the whole URL. And the source URL needs its trailing slash, for reasons I don't quite understand. Something about how wget recurses over http.
Great, that's awesome. The readme is now my go-to authority on wget ;)
I'm unsure about filtering to a single file, and 'recursive' in the wget args. Might be a good set to explore more broadly. (I want this file in particular for a particular polygon mesh example that I need).