Widen correctly. - annna - Annna the nice friendly bot.
HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
---
DIR commit fd56755a4bc730b8ee1214b094dca5d90ea2556c
DIR parent 80464afb2e1fdfec3e6eb3f796d1172e12b20304
HTML Author: Annna Robert-Houdin <annna@bitreich.org>
Date: Sat, 15 May 2021 21:18:06 +0200
Widen correctly.
Diffstat:
M annna-message-common | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
DIR diff --git a/annna-message-common b/annna-message-common
@@ -649,18 +649,19 @@ case "${text}" in
"${botname}, bonjour !")
annna-say -c "${channel}" "${user}, bonjour !"
;;
-"${botname}, please widen "*)
- hashtag="${text##* \#}"
+"${botname}, please widen #"*)
+ hashtag="$(printf "%s\n" "${text}" | cut -c 22-)"
origext="$(grep -E "^#${hashtag} " "${hashtagfile}" | sed 's/.*\.//')"
widefile="wide-${hashtag}.${origext}"
{
- if ffmpeg -n -i "/br/gopher/memecache/${hashtag}.*" \
+ if ffmpeg -n -i "/br/gopher/memecache/${hashtag}.${origext}" \
-vf "scale=iw*4:ih,crop=iw/4:ih:iw/4:ih,setsar=1" \
"/br/gopher/memecache/wide/${widefile}"
then
annna-say -c "${channel}" "${user}, gopher://bitreich.org/9/memecache/wide/${widefile}"
fi
} &
+ exit 0
;;
"${botname}, please help.")
# Help Message.