A simple program to provide a thumbnail for an image by using the freedesktop-specified thumbnail data-base.
AllMyToes is in a very early development state.
Call allmytoes
with an image as parameter. The program will print the path to a thumbnail to stdout
.
```
allmytoes some_image.jpg /home/me/.cache/thumbnails/normal/b7931d1d6e0439c1a6e2e6b02c5b21a6.png ```
AllMyToes can be useful for any situation where one wants to show a size-limited image in a scripted environment. I guess such use-cases will mostly be found in lightweight/scripted desktop/working environments. Thumbnails can be used – for example – as icons in desktop notifications or as terminal-overlays.
My personal motivation was the use of thumbnails for image previews in terminal-based file managers (joshuto and ranger).
Thumbnailer is not for providing a thumbnail for a specific image, but for creating a bunch of thumbnails for a list of files to have them pre-produced when needed later. One use-case here is the preparation of a read-only remote/mass-storage gallery.
Thumbnailer does not care if a thumb already exists for a certain image, but always creates a new one.
I have to thank Thumbnailer as it helped me a lot to get started with AllMyToes as a Rust-noob.
AllMyToes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
AllMyToes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with AllMyToes. If not, see https://www.gnu.org/licenses/.
The goal is to be 0.9 conform. * https://specifications.freedesktop.org/thumbnail-spec/thumbnail-spec-latest.html * https://specifications.freedesktop.org/thumbnail-spec/thumbnail-spec-0.9.0.html * https://specifications.freedesktop.org/thumbnail-spec/thumbnail-spec-0.8.0.html
get_toe_path_if_existing_and_valid
, check mtime and report invalidity if not equal to thumb mtimefail
dirpngcheck -t <img>