On 07/08/2015 09:58
PM, Arman Eshaghi wrote:
Hi all,
First thanks for this amazing open-source piece of art.
I have written a program that converts specific type of
images into temporary (/tmp) jpeg format, so that I can
then use ranger preview image capabilities to quickly go
through my files. What would be the best way to show
these temporary files from tmp folder without needing
user to manually change back to /tmp. I am not sure
whether I have to write a new plugin for ranger, or just
hack scope.sh? The problem is that the file I need to
show as the preview is a converted file in temporary
folder.
Thanks for any input on this.
Arman
Yes, it’s possible
and even supported to create custom previews. Please refer to
this section of the user guide: https://github.com/hut/ranger/wiki/Official-user-guide#custom-image-previews
This in an example
of such previews in scope.sh
:
video/*)
ffmpegthumbnailer -i "$path" -o "$cached" -s 0 && exit 6 || exit 1;;