diff options
author | InigoGutierrez <inigogf.95@gmail.com> | 2022-07-25 20:51:52 +0200 |
---|---|---|
committer | InigoGutierrez <inigogf.95@gmail.com> | 2022-07-25 20:51:52 +0200 |
commit | e1a0586a6b9922b4b279278239326cda11599e71 (patch) | |
tree | 446f7e8607c7f28e6a87a29be8caf9b0d49a24ee /stow/ranger/.config | |
parent | 22e25839cb0dc6ff6de0703f78cbe2921a2eb1cc (diff) | |
download | configs-e1a0586a6b9922b4b279278239326cda11599e71.tar.gz configs-e1a0586a6b9922b4b279278239326cda11599e71.zip |
Added SVG, video and PDF previews to ranger/scope.sh
Diffstat (limited to 'stow/ranger/.config')
-rwxr-xr-x | stow/ranger/.config/ranger/scope.sh | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/stow/ranger/.config/ranger/scope.sh b/stow/ranger/.config/ranger/scope.sh index f403ed8..17fa0e0 100755 --- a/stow/ranger/.config/ranger/scope.sh +++ b/stow/ranger/.config/ranger/scope.sh @@ -128,9 +128,9 @@ handle_image() { local mimetype="${1}" case "${mimetype}" in ## SVG - # image/svg+xml|image/svg) - # convert -- "${FILE_PATH}" "${IMAGE_CACHE_PATH}" && exit 6 - # exit 1;; + image/svg+xml|image/svg) + convert -- "${FILE_PATH}" "${IMAGE_CACHE_PATH}" && exit 6 + exit 1;; ## DjVu # image/vnd.djvu) @@ -154,20 +154,20 @@ handle_image() { exit 7;; ## Video - # video/*) - # # Thumbnail - # ffmpegthumbnailer -i "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}" -s 0 && exit 6 - # exit 1;; + video/*) + # Thumbnail + ffmpegthumbnailer -i "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}" -s 0 && exit 6 + exit 1;; ## PDF - # application/pdf) - # pdftoppm -f 1 -l 1 \ - # -scale-to-x "${DEFAULT_SIZE%x*}" \ - # -scale-to-y -1 \ - # -singlefile \ - # -jpeg -tiffcompression jpeg \ - # -- "${FILE_PATH}" "${IMAGE_CACHE_PATH%.*}" \ - # && exit 6 || exit 1;; + application/pdf) + pdftoppm -f 1 -l 1 \ + -scale-to-x "${DEFAULT_SIZE%x*}" \ + -scale-to-y -1 \ + -singlefile \ + -jpeg -tiffcompression jpeg \ + -- "${FILE_PATH}" "${IMAGE_CACHE_PATH%.*}" \ + && exit 6 || exit 1;; ## ePub, MOBI, FB2 (using Calibre) |