Add random video effect selection. - 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 0d5060fa078afbd613ae543169905e52b89f93b2
DIR parent 5f0791cbd101bd46640527ca2a58bcae76035ff6
HTML Author: Annna Robert-Houdin <annna@bitreich.org>
Date: Sat, 17 Aug 2024 09:08:47 +0200
Add random video effect selection.
Diffstat:
M annna-message-common | 26 ++++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
---
DIR diff --git a/annna-message-common b/annna-message-common
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
export PATH="/br/bin:$PATH"
@@ -1176,12 +1176,34 @@ case "${text}" in
"${ircuser}, please widen #"*|\
"${ircuser}, please ww1 #"*|\
"${ircuser}, please yellow #"*|\
-"${ircuser}, please zucc #"*)
+"${ircuser}, please zucc #"*|\
+"${ircuser}, please random #"*)
hashtag="$(printf "%s\n" "${text}" | sed 's/.*#//; s/ .*//' )"
recipient="$(printf "%s\n" "${text}" | sed 's/.* for //' )"
origext="$(grep -E "^#${hashtag} " "${hashtagfile}" | sed 's/.*\.//')"
{
filter="$(printf '%s\n' "${text}" | cut -d' ' -f3)"
+ if [ "${filter}" = "random" ];
+ then
+ filters=("antidepressant" "amplify" "amsterdamify"
+ "banjo" "bounce" "breakingnews"
+ "celtify" "concatenate" "crimetv"
+ "curb" "daybowbow" "deathmetal"
+ "developers" "dontdoit" "dontsaytoyourmother"
+ "doomify" "dutchapprove" "french"
+ "FRENCH" "imam" "loop" "looop"
+ "mow" "namflashback" "news"
+ "pullmyfinger" "putin" "reverse"
+ "richardstrauss" "ritual" "sadviolin"
+ "science" "scrollify" "sendtohell"
+ "sexify" "slavify" "slowdown"
+ "smith" "speedup" "techno"
+ "technodrugs" "thin" "torture"
+ "tshirt" "trumpapprove" "USAUSA"
+ "usa" "wat" "widen" "ww1"
+ "yellow" "zucc")
+ filter="${filters[ $RANDOM % ${#filters[@]} ]}"
+ fi
outfile="${filter}-${hashtag}.mkv"
outpath="/br/gopher/memecache/filter/${outfile}"
inpath="/br/gopher/memecache/${hashtag}.${origext}"