Add example for downloading a list of URLs from a file#58
Add example for downloading a list of URLs from a file#58
Conversation
|
curl has native support from downloading a "URL list" with |
I think this is more a shell script example than a wcurl example, TBH. The way wcurl is being invoked is exactly the same as you would do with a single URL, so there's nothing new for the user here (except how to make a loop in their shell, if they don't know yet). |
|
|
||
| ```sh | ||
| while read -r url; do wcurl "$url"; done < filename.txt | ||
| ``` |
There was a problem hiding this comment.
There's an extra space before the backticks, there should be two :)
|
I'm still not yet sure whether it's a good idea to list this in the docs, it feels clunky due to the fact that this is just documenting how to write shellscript and not exactly a wcurl feature. I wonder if it's really useful. I'll keep this open while I make a decision. |
Hmm, today, if one calls But then even if we dropped It's not great as this make wcurl behave differently whether the input is a file or URLs. I don't think solving this without relying on curl's parsing of I'll give it a go at a few ways to solve this and if I'll push a PR if I end up with anything that I'm happy with. Edit - I've got it, will publish a PR soon. |
|
I've published a PR with a proposal for how to achieve the input-file feature. |
There are two ways of doing this now:
1) wget way: -i, --input-file
2) curl way: providing an URL argument starting with "@", wcurl will
see "@filename" and download URLs from "filename".
Lines starting with "#" inside input files are ignored.
This is a continuation of #58
Co-authored-by: Sergio Durigan Junior <github@sergiodj.net>
There are two ways of doing this now:
1) wget way: -i, --input-file
2) curl way: providing an URL argument starting with "@", wcurl will
see "@filename" and download URLs from "filename".
Lines starting with "#" inside input files are ignored.
This is a continuation of #58
Co-authored-by: Sergio Durigan Junior <github@sergiodj.net>
There are two ways of doing this now:
1) wget way: -i, --input-file
2) curl way: providing an URL argument starting with "@", wcurl will
see "@filename" and download URLs from "filename".
Lines starting with "#" inside input files are ignored.
This is a continuation of #58
Co-authored-by: Sergio Durigan Junior <github@sergiodj.net>
I haven't thoroughly tested this and checked for corner cases yet, but does it make sense to document this usecase in the manpage?
Pending: