Bionus / imgbrd-grabber

Very customizable imageboard/booru downloader with powerful filenaming features.
https://www.bionus.org/imgbrd-grabber/
Apache License 2.0
2.56k stars 219 forks source link

cli option to add custom or skip "commands" that is run after each downloaded image. #3262

Open KAGEYAM4 opened 3 months ago

KAGEYAM4 commented 3 months ago

Is your feature request related to a problem? Please describe I currently use "commands" to add list of new images downloaded. I would like this "commnds" to be skipped (i.e "commands won't run"), or maybe provide custom "commands" from the cli for some sources. For example-

  1. when i run Grabber-cli *****, and using source-x, i don't want the "commands" to run.
  2. when i run Grabber-cli *****, and using source-y, i want to provide custom "commands" to run.

Describe the solution you'd like --commands cli option to change the command that is run.

Bionus commented 2 months ago

I can add a flag to enable/disable the running of the commands with no problem.

As for passing a custom one, it'd be a bit more complicated, since there's different versions of commands (SQL and shell commands), and there's different steps at which commands are run: startup, for each tag, for each image, end (cf docs). Although the before/after commands shouldn't be necessary in a CLI context where the parent script can just do it itself.

I'll give it a whirl and see how it goes.

KAGEYAM4 commented 2 months ago

I though there was just one type of command - Shell commands and user can run whatever program they want through shell wether it be sqllite3, jq or some other command. Where's this SQL command?

Also what is the difference between these two screens ->

image

image

Bionus commented 2 months ago

The second screenshot is what you're asking for, the SQL commands.