add support for widening video memes - 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 ce3a9c826b2ea86a293b673fbc419e0f113dd8b7 DIR parent 7e42e50b643533b95095cd75d12b7f78bd3fbbff HTML Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Sat, 15 May 2021 20:38:09 +0200 add support for widening video memes Signed-off-by: Annna Robert-Houdin <annna@bitreich.org> Diffstat: M annna-message-common | 11 +++++++++++ 1 file changed, 11 insertions(+), 0 deletions(-) --- DIR diff --git a/annna-message-common b/annna-message-common @@ -649,6 +649,17 @@ case "${text}" in "${botname}, bonjour !") annna-say -c "${channel}" "${user}, bonjour !" ;; +"${botname}, please widen "*) + hashtag="${text##* \#}" + origext="$(grep -E "^#${hashtag} " "${hashtagfile}" | sed 's/.*\.//')" + widefile="wide-${hashtag}.${origext}" + { if ffmpeg -n -i "/br/gopher/memecache/${hashtag}.*" \ + -vf "scale=iw*4:ih,crop=iw/4:ih:iw/4:ih,setsar=1" \ + "/br/gopher/wide/${widefile}" + then + annna-say -c "${channel}" "${user}, gopher://bitreich.org/9/wide/${widefile}" + fi } & + ;; "${botname}, please help.") # Help Message. # TODO: Add multiple line support to annna-say -c(1) with sleep.