From 538b88d61a557a1fb5cb3da452c19241805850bd Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Fri, 6 Apr 2018 16:46:56 +0200 Subject: [PATCH] gopher.sh: support for ImageUtils.sh --- gopher.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/gopher.sh b/gopher.sh index 6b16f26..e433ac0 100755 --- a/gopher.sh +++ b/gopher.sh @@ -143,14 +143,16 @@ download) ;; g|I) if convert -h >/dev/null 2>&1; then - if jp2a -h >/dev/null 2>&1; then + if ImageUtils.sh --help >/dev/null 2>&1; then + ImageUtils.sh --mode=DITHERING \ + --width=74 "$tmp" | less + elif jp2a -h >/dev/null 2>&1; then convert "$tmp" "$tmp.jpg" - # not supported: --chars=" ░▒▓█" - jp2a --border --colors --chars=" .-+=o8#"\ + jp2a --border --chars=" .-+=o8#"\ --width=74 "$tmp.jpg" | less else - echo "required program not found to view images: jp2a" \ - | less + echo "required program not found to view images:" \ + jp2a or ImageUtils.sh | less fi else echo "required program not found to view images: convert" \ -- 2.27.0