|
@ -58,12 +58,12 @@ handle_extension() { |
|
|
exit 1;; |
|
|
exit 1;; |
|
|
|
|
|
|
|
|
# PDF |
|
|
# PDF |
|
|
pdf) |
|
|
|
|
|
# Preview as text conversion |
|
|
|
|
|
pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - | fmt -w ${PV_WIDTH} && exit 5 |
|
|
|
|
|
mutool draw -F txt -i -- "${FILE_PATH}" 1-10 | fmt -w ${PV_WIDTH} && exit 5 |
|
|
|
|
|
exiftool "${FILE_PATH}" && exit 5 |
|
|
|
|
|
exit 1;; |
|
|
|
|
|
|
|
|
#pdf) |
|
|
|
|
|
# # Preview as text conversion |
|
|
|
|
|
# pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - | fmt -w ${PV_WIDTH} && exit 5 |
|
|
|
|
|
# mutool draw -F txt -i -- "${FILE_PATH}" 1-10 | fmt -w ${PV_WIDTH} && exit 5 |
|
|
|
|
|
# exiftool "${FILE_PATH}" && exit 5 |
|
|
|
|
|
# exit 1;; |
|
|
|
|
|
|
|
|
# BitTorrent |
|
|
# BitTorrent |
|
|
torrent) |
|
|
torrent) |
|
@ -115,14 +115,14 @@ handle_image() { |
|
|
ffmpegthumbnailer -i "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}" -s 0 && exit 6 |
|
|
ffmpegthumbnailer -i "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}" -s 0 && exit 6 |
|
|
exit 1;; |
|
|
exit 1;; |
|
|
# PDF |
|
|
# PDF |
|
|
# application/pdf) |
|
|
|
|
|
# pdftoppm -f 1 -l 1 \ |
|
|
|
|
|
# -scale-to-x 1920 \ |
|
|
|
|
|
# -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 1920 \ |
|
|
|
|
|
-scale-to-y -1 \ |
|
|
|
|
|
-singlefile \ |
|
|
|
|
|
-jpeg -tiffcompression jpeg \ |
|
|
|
|
|
-- "${FILE_PATH}" "${IMAGE_CACHE_PATH%.*}" \ |
|
|
|
|
|
&& exit 6 || exit 1;; |
|
|
|
|
|
|
|
|
# Preview archives using the first image inside. |
|
|
# Preview archives using the first image inside. |
|
|
# (Very useful for comic book collections for example.) |
|
|
# (Very useful for comic book collections for example.) |
|
|