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 · 2 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 😅

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