Skip to content
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

Choose the name of file in braces for complex URLs #221

Closed
rodrigozanatta opened this issue Apr 15, 2015 · 1 comment
Closed

Choose the name of file in braces for complex URLs #221

rodrigozanatta opened this issue Apr 15, 2015 · 1 comment

Comments

@rodrigozanatta
Copy link

When using some trick to download various URLs with braces {}, there is a bug in cURL because or you can save using the URL part in braces as names or choose only one name. The problem is if if the names in braces are complex.

I would like to suggest the ability to configure the name inside the braces. Today we have this grammar:

  • {partURL1,partURL2,partURL3}

and I suggest use this (can the cURL use the : as separator?)

  • {partURL1**:name1**,partURL2**:name2**,partURL3**:name3**}
  • {partURL1**:name1**,partURL2,partURL3}
    • partURL1 will use the name1 and the others will use partURL2 and partURL3 as name

So the command

curl --url 'http://www.google.com/{various:first,complex,names:third}' --output 'name_#1.html'

will produce:

http://www.google.com/various and save in name_first.html
http://www.google.com/complex and save in name_complex.html (I don't send the name, use the part URL as default)
http://www.google.com/names and save in name_third.html

@bagder
Copy link
Member

bagder commented Apr 15, 2015

This isn't a bug, this is an idea on how to improve curl in the future. It belongs in the TODO file, and I've now added it there in commit 1ba6e4c. Closing this issue.

@bagder bagder closed this as completed Apr 15, 2015
@lock lock bot locked as resolved and limited conversation to collaborators May 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants