Skip to content

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

@rodrigozanatta

Description

@rodrigozanatta

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions