Take a second argument as ascii height (use 75 by default)

This commit is contained in:
BBaoVanC 2020-12-26 16:51:33 -06:00
parent d3aa525839
commit 82ce6a4c92
No known key found for this signature in database
GPG key ID: 18089E4E3CCF1D3A

View file

@ -20,10 +20,13 @@ case "$1" in
;;
esac
height=${2:-75}
echo "Using height $height"
url=$(curl -fsSL "$imgurl" | jq -r ".url")
curl -fsSLo "$tmpfile.jpg" "$url"
jp2a --height=50 "$tmpfile.jpg" > "$tmpfile"
jp2a --height="$height" "$tmpfile.jpg" > "$tmpfile"
neofetch --source "$tmpfile"
rm "$tmpfile" "$tmpfile.jpg"