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

Feature Suggest: Use .txt, .csv or .json file for bulk download #93

Open
aryomuzakki opened this issue Nov 23, 2024 · 4 comments
Open
Labels
enhancement New feature or request

Comments

@aryomuzakki
Copy link

Great projects, thanks.

Would be better if we can have .txt, .csv and .json as a source for bulk download with cli or api.
And ask for column header if more than 1 column/key is detected in .csv / .json.
Or maybe just stick with something like urls or links.

@fityannugroho fityannugroho added the enhancement New feature or request label Nov 24, 2024
@fityannugroho
Copy link
Owner

fityannugroho commented Nov 24, 2024

And ask for column header if more than 1 column/key is detected in .csv / .json.

I don't get it about that part ☝🏻 What column header?

In my mind, the .csv or .json file for bulk download should contain URLs (and the image options) like this:

Using JSON file

[
  "https://example.com/me/avatar.jpg",
  "https://example.com/me/old-avatar.jpg",
  "https://example.com/johndoe/avatar.jpg",
  "https://example.com/janedoe/avatar.jpg"
]

With image options:

[
  {
    "url": "https://example.com/me/avatar.jpg",
    "directory": "myimages",
    "name": "myavatar",
    "extension": "png"
  },
  {
    "url": "https://example.com/me/old-avatar.jpg",
    "name": "oldavatar"
  },
  {
    "url": "https://example.com/johndoe/avatar.jpg",
    "directory": "friends",
    "name": "johndoe"
  },
  {
    "url": "https://example.com/janedoe/avatar.jpg",
    "directory": "friends",
    "name": "janedoe",
    "extension": "webp"
  }
]

The command:

$ imgdl /path/to/file.json

Using CSV or TXT file

https://example.com/me/avatar.jpg
https://example.com/me/old-avatar.jpg
https://example.com/johndoe/avatar.jpg
https://example.com/janedoe/avatar.jpg

With image options:

url,directory,name,extension
"https://example.com/me/avatar.jpg","myimages","myavatar","png"
"https://example.com/me/old-avatar.jpg",,"oldavatar"
"https://example.com/johndoe/avatar.jpg","friends","johndoe",
"https://example.com/janedoe/avatar.jpg","friends","janedoe","webp"

The command:

$ imgdl /path/to/file.csv
$ imgdl /path/to/file.txt

So, what do you mean with "more than 1 column/key"? Can you provide some example so everyone can understand it.

@aryomuzakki
Copy link
Author

sorry, my bad, I forgot that there are already options like that.

let's just forget that I said that 😁. I don't even remember how i come up with that 😅

@fityannugroho
Copy link
Owner

That's not what I meant. It is true that the download via file feature DOES NOT currently exist. My question above was meant to confirm what the need is. That's why I gave a usage example as above. Now the question is, does that example match what you want?

@aryomuzakki
Copy link
Author

Right, I cause a misunderstanding again.

Anyway, your example is absolutely match what I want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants