EL="`tput init`";
fi
-PREFIX="[0-9h]"
+PREFIX="[0-9hIg]"
# $0 [FILE]
# Display a gopher menu for the given resource
echo "<BINARY FILE>" | less
;;
g|I)
- if convert -h >/dev/null 2>&1; then
- if jp2a -h >/dev/null 2>&1; then
+ if img2aa --help >/dev/null 2>&1; then
+ img2aa --mode=DITHERING \
+ --width=74 "$tmp" | less
+ elif jp2a -h >/dev/null 2>&1; then
+ if convert -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" \
+ echo "required program not found to view images: convert" \
| less
fi
else
- echo "required program not found to view images: convert" \
- | less
+ echo "required program not found to view images:" \
+ jp2a or img2aa | less
fi
;;
*)