-
Notifications
You must be signed in to change notification settings - Fork 17
Add example for downloading a list of URLs from a file #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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: