Widen correctly. - annna - Annna the nice friendly bot. | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit fd56755a4bc730b8ee1214b094dca5d90ea2556c | |
parent 80464afb2e1fdfec3e6eb3f796d1172e12b20304 | |
Author: Annna Robert-Houdin <[email protected]> | |
Date: Sat, 15 May 2021 21:18:06 +0200 | |
Widen correctly. | |
Diffstat: | |
M annna-message-common | 7 ++++--- | |
1 file changed, 4 insertions(+), 3 deletions(-) | |
--- | |
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.… | |
fi | |
} & | |
+ exit 0 | |
;; | |
"${botname}, please help.") | |
# Help Message. |