Crates.io | thumbnailer-bridge |
lib.rs | thumbnailer-bridge |
version | 0.1.2 |
source | src |
created_at | 2023-06-24 09:01:00.980369 |
updated_at | 2023-07-22 18:34:06.920686 |
description | Bridge between your file manager and thumbnail daemon. |
homepage | |
repository | https://github.com/Elvyria/thumbnailer-bridge |
max_upload_size | |
id | 898866 |
size | 195,327 |
This tool makes requests to create thumbnails through D-Bus following org.freedesktop.thumbnails.Thumbnailer1 specification. It doesn't create thumbnails on it's own, but acts as a bridge between your file manager and thumbnailer.
To create thumbnails you will need a daemon, like tumbler.
What are the advantages of using this instead of a shell script with dbus-send
?
dbus-send
.libmagic
and dbus
without additional processes.Bridge between your file manager and thumbnail daemon.
Usage: thumbnailer-bridge [OPTIONS] [FILE]...
Arguments:
[FILE]...
Options:
-t, --thumbnail Print path to thumbnail if it exists and up to date
-f, --flavor <FLAVOR> Flavor of the thumbnails [default: normal]
-s, --scheduler <SCHEDULER> Scheduler for thumbnail generation [default: default]
-u, --unchecked Do not check if thumbnail already exists and up to date
-l, --listen Listen for notifications
--list-flavors List supported schedulers
--list-schedulers List supported thumbnail flavors
--list-mime List supported media types
-h, --help Print help
-V, --version Print version
This is how you request thumbnails. Flavor -f
or --flavor
is usually responsible for the size of a thumbnail.
thumbnailer-bridge -f x-large $PWD/*
I recommend you to use full path to your current directory that your file manager provides, instead of using relative path,
this way, if you're inside a sym-linked location /home/user/pictures -> /mnt/nas
, your thumbnails will be preserved
if you decide to remount original location /home/user/pictures -> /mnt/nas-old
If you want to be notified when thumbnails are ready to use, add --listen
flag.
$ thumbnailer-bridge --listen
/home/user/pictures/meal-2023-02-22.png
/home/user/pictures/booty.jpg
/home/user/books/how_to_eat_chicken.epub
...
You will find your thumbnails at ${XDG_CACHE_HOME:-~/.cache}/thumbnails/(flavor)/
.
To find a thumbnail, corresponding to your file, you can use -t
or --thumbnail
flag.
$ thumbnailer-bridge -f x-large -t ~/pictures/cat.png
/home/user/.cache/thumbnails/x-large/722b4dbaa8bf716e9f9f7f33f72fd9d4.png
For additional information: Thumbnail Managing Standard.
Can be installed from crates.io with cargo
:
cargo install thumbnailer-bridge
To build this little thing, you'll need some Rust.
git clone --depth 1 https://github.com/Elvyria/thumbnailer-bridge
cd thumbnailer-bridge
cargo build --release