A "browser" for viewing images associated with tags.
The set of images to view can be searched / filtered in two ways:
- Selecting a single tag from a list of tags. The list of tags may be searched with wildcards and by category.
- Using boolean query (AND, NOT, OR) to find images which match a combination of tags.
When a set of images has been specified, the first image (and details) is shown. You may then cycle through all the images in the set.
The browser is a simple Tkinter interface and may be run on any platform with Python 3, Tkinter and PIL installed. Uses the sqlite database as defined by the database project in this repository.
The browser requires tkinter and Pillow. These may need to be installed.
sudo apt install python3-tk
sudo apt install python3-pil
sudo apt install python3-pil-imagetk
or
pip install Pillow
- The program assumes the database (
danbooru2019.py) is in the application folder. You can change this intagview.py. - Edit the
IMAGES_BASEvalue intagview.pyto the path of the image set (e.g.G:\danbooru2019\original). - Execute
python tagview.py
In the above screencap, the current image set is the 26,897 images with the tag maid that do not have the tag touhou. Also,
the tag list window has been filtered to show all tags which start with the string maid.
- Shows the current image in the image set. The image is currently sized to the view area, preserving aspect ratio.
- Shows tags and other details about the current image.
- The count and position of the current image in the image set.
- Buttons to navigate within the image set. The PageUp, PageDn and Home keys are handled as well.
- Mark the current image as "hidden" in the database. "Hiding" an image will prevent it from appearing in future sets. Note: the current code labels this button as "Hide", not "Delete".
- The filter window. This entry allows you to filter by the tag name. Wildcards are currently using database syntax (i.e. '%' is wildcard, not '*').
- This entry allows you to filter tags by their Danbooru category (artist, character, etc).
- The list of filtered tags to select from. Click the 'Apply' button to filter by name and category. Selecting a tag from this list will change the image set to those images with the selected tag.
- The advanced search tag window. Up to four clauses may be applied. Clauses may be
AND,AND NOT,OR,OR NOT. In the screenshot above, the full clause ismaid AND NOT touhou. Wildcards are allowed. E.g. to find images which matchmaidand are part of thefateseries, you'd usemaid and fate%. - This entry allows you to filter images by their rating.
- Use this button to update the image set with your query and rating.
- Use this button to reset the query to empty.
- (Not shown). Minimizing the image window will minimize the two filter windows as well. [20200901: On Windows; doesn't seem to work on Linux.]
- (Not shown). Near to marker 4, the "To File" button will let you export the current set of image paths to a text file.
Annotation courtesy of Greenshot.
Updated 20200901:
improve perceived performance, especially for "large" image sets- view more than the first 100 tags
- full-size scrollable image view (when image is very large)
ability to generate a file containing the paths to all images in the current set- animate GIF and APNG
- ability to add / remove more boolean clauses
- querying with boolean clauses can be quite slow. Do something to improve perceived performance.
- add ability to create "favorite" groups and mark an image as such (i.e. personal pools).
- add ability to include "hidden" images in the image set
- tweak the 'look' of controls (e.g. add padding)
- save and restore window sizes and positions
