imgbrd-grabber icon indicating copy to clipboard operation
imgbrd-grabber copied to clipboard

View downloaded images through application

Open pingas37 opened this issue 3 years ago • 6 comments

Is your feature request related to a problem? Please describe

I have downloaded a multitude of images and videos through this application, but overtime I have had trouble finding specific ones when browsing through my collection. The service certainly does give a wide variety of options to choose specific paths for downloads to go to, and these downloads can be organized in a broad sense this way such as by artist or copyright.

However, I like to have my downloads organized in a way that I can pull up any certain number of tags at once and it will retrieve any images associated with those tags. I currently cannot do this, as when I browse I can only view images associated with a certain copyright, or a certain character in a folder hierarchy. I don't think what I want can be accomplished through a normal file viewer on a machine, which is why I would like to suggest the proposed solution below.

Describe the solution you'd like

I think it would be incredibly useful if there was another tab that operated in a similar way that the favorites tab is formatted, only it browsed the files that you downloaded on your device. For example, if I wanted to look at all downloads that contained the tag "1girl", I would have no way of doing so through my device currently. The feature described above would greatly benefit in the appreciation and viewing of the images that I have downloaded, as I would be able to select any tag that I wanted to and it would pull up all of the images that I have already downloaded.

An alternative idea would be a tab that looks exactly like the default search bar, where you can search for any number of tags. Once the query has been entered, a search beings for finding all of the downloads on your device that match the criteria. The result would then looks similar to a normal search, just instead of finding images from websites it would find images on your device.

Describe alternatives you've considered

I have written a couple python scripts that iterates through my downloaded files and calls to API's of websites that I have added to my sources within the Booru Downloader application. These tags would then be added to specific metadata of the image. This eventually became a clumsy way of doing things, and have since disregarded the idea. I still have the scripts, and they could be useful to further illustrate what I am trying to accomplish.

Additional context

I do not have any at the moment. Anything to further illustrate my point can be provided upon request. Thanks for reading!

pingas37 avatar Aug 27 '21 05:08 pingas37

This is something that has been requested a few times, but there's just no very good way to implement this without turning Grabber into an imageboard itself, with a lot of additional work and maintenance added for in the end a sub-par imageboard.

But for your use case, I see three possible solutions:

  • As you mentioned, using meta-data then conveniently relying on either your system's built-in search, see here to see how to do that with Grabber
  • Setting up your own offline booru on your computer (see here for an explanation on how to do this with Szurubooru for example), and have Grabber automatically store downloaded images inside it
  • Using a program such as Hydrus to organize your files, using a "sidecar" file (in Grabber terminology, an "external log file", i.e. a TXT file with the same name as your image containing all the tags), using this syntax:
rating:%rating%
%all:includenamespace,excludenamespace=general,unsafe,spaces,separator=\n%

Do you think any of those solutions could solve your issues?

Of course, having a built-in booru in Grabber would also solve this, but for now I don't think that's really possible.

Bionus avatar Sep 02 '21 15:09 Bionus

I also have an interest in this, and have been asking in the Hydrus support thread on it. I still have to look in to exactly how to get Hydrus to recognize the sidecar / external log files.

I've been saving log files with a particular formatting (not your example syntax here) for a while, but there are definitely images that don't have sidecar files. Is there a way to tell Grabber to go and make sidecar files for the older images that it has downloaded?

Tumultuous-RGR-SiM avatar Sep 19 '21 07:09 Tumultuous-RGR-SiM

This is something that has been requested a few times, but there's just no very good way to implement this without turning Grabber into an imageboard itself, with a lot of additional work and maintenance added for in the end a sub-par imageboard.

But for your use case, I see three possible solutions:

* As you mentioned, using meta-data then conveniently relying on either your system's built-in search, see [here](https://bionus.github.io/imgbrd-grabber/docs/metadata.html) to see how to do that with Grabber

* Setting up your own offline booru on your computer (see [here](https://bionus.github.io/imgbrd-grabber/docs/commands/szurubooru.html) for an explanation on how to do this with Szurubooru for example), and have Grabber automatically store downloaded images inside it

* Using a program such as [Hydrus](https://hydrusnetwork.github.io/hydrus/) to organize your files, using a "sidecar" file (in Grabber terminology, an "external log file", i.e. a TXT file with the same name as your image containing all the tags), using this syntax:
rating:%rating%
%all:includenamespace,excludenamespace=general,unsafe,spaces,separator=\n%

Do you think any of those solutions could solve your issues?

Of course, having a built-in booru in Grabber would also solve this, but for now I don't think that's really possible.

Hydrus really just doesn't work, no tag search feature and no ability to link to file like Tagspaces has, rather than having tens of thousands of duplicate images as thumbnails (it also deletes the filename and has no way to open the original file, which is just scratching the surface of things wrong with Hydrus). Tagspaces is the most like what is needed but its .json sidecar files seem too convoluted to implement Grabber with them so it would be great if Grabber had a simple sidecar and tag search feature like an offline booru without having to possibly run a server through a virtual machine with Hydrus just to view a picture, Grabber has all the other pieces necessary to make it automatically tag and filter, we just need a program that actually works with Grabbers files and isn't ridiculously complicated.

Painless68 avatar May 19 '22 16:05 Painless68

rating:%rating%
%all:includenamespace,excludenamespace=general,unsafe,spaces,separator=\n%

Just curious, is there any reason why you convert underscores to spaces in the external log file? I haven't used hydrus yet, but I imagine it would result in wrong tags once imported?

lx30011 avatar Aug 08 '22 11:08 lx30011

Tagspaces is the most like what is needed but its .json sidecar files seem too convoluted to implement Grabber with them

It might take some work but it's definitely possible to have Grabber save sidecar files as JSON, depending on the JSON format. I'd suggest using a JavaScript filename for those since there's a convenient JSON.stringify() function in there.

Just curious, is there any reason why you convert underscores to spaces in the external log file? I haven't used hydrus yet, but I imagine it would result in wrong tags once imported?

They also use \n as separator, which means "line break". So there would be one tag per line, with no underscores, so no problem importing in that case. But yes indeed if you use a space as a separator and remove the underscores you'll have a hard time afterwards separating the tags 😅

Bionus avatar Aug 09 '22 22:08 Bionus