Add Egyptian dance support to annna. - 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 69bb3614ffb26988dfe3210716e422ee922094ec
DIR parent 2d73a2d37fba885990697e087dc6290cd2dec570
HTML Author: Annna Robert-Houdin <annna@bitreich.org>
Date: Thu, 26 Dec 2024 16:58:48 +0100
Add Egyptian dance support to annna.
Diffstat:
M annna-message-common | 10 +++++++++-
M dance-moves-gen | 24 +++++++++++++++++-------
2 files changed, 26 insertions(+), 8 deletions(-)
---
DIR diff --git a/annna-message-common b/annna-message-common
@@ -1216,10 +1216,18 @@ case "${text}" in
"For humanity!")
annna-say -s "${server}" -c "${channel}" "${user}, for humanity! gophers://bitreich.org/0/memecache/annna-rchism.txt"
;;
-"${ircuser}, please dance."|"${ircuser}, let us celebrate!"|"\\o/"|"\^o^/"|"/o/"|"\o\\"|"~o~")
+"${ircuser}, please dance."|"\\o/"|"\^o^/")
dancemoves="$(dance-moves-gen)"
annna-say -s "${server}" -c "${channel}" -- "${dancemoves}"
;;
+"${ircuser}, let us celebrate!"|"/o/"|"\o\\")
+ dancemoves="$(dance-moves-gen -m)"
+ annna-say -s "${server}" -c "${channel}" -- "${dancemoves}"
+ ;;
+"${ircuser}, please egyptian dance."|"${ircuser}, let us egyptian celebrate!"|"~o~")
+ dancemoves="$(dance-moves-gen -e)"
+ annna-say -s "${server}" -c "${channel}" -- "${dancemoves}"
+ ;;
"${ircuser}, please stamp this letter for me.")
annna-say -s "${server}" -c "${channel}" -- "${user}, here: 🖃 "
;;
DIR diff --git a/dance-moves-gen b/dance-moves-gen
@@ -12,25 +12,35 @@ def usage(app):
sys.exit(1)
def main(args):
- moves = ["\\o/", "\\o_", "_o_", "_o/", "~o/", "\\o~", "~o~",
+ ascii_moves = ["\\o/", "\\o_", "_o_", "_o/", "~o/", "\\o~", "~o~",
"-o/", "\\o-", "-o-", "\\o.", ".o/", ".o.",
"\\o7", "_o7", "-o7", ".o7", "~o7", "\\^o^/",
- "\\^o_", "_o^/", "~o^/", "\\^o~", "-o^/",
- "\\^o-", "\\^o.", ".o^/", "\\^o7",
- "(>OoO)>", "<(OoO<)", "/o/", "\\o\\"]
+ "\\^o_", "_o^/", "~o^/", "\\^o~", "-o^/",
+ "\\^o-", "\\^o.", ".o^/", "\\^o7",
+ "(>OoO)>", "<(OoO<)", "/o/", "\\o\\"]
+ egyptian_moves = [
+ "𓀀", "𓀁", "𓀂", "𓀃", "𓀉", "𓀊",
+ "𓀋", "𓀏", "𓀐", "𓀒", "𓀓", "𓀔",
+ "𓀕", "𓀖", "𓀞", "𓀟", "𓀠", "𓀡",
+ "𓀢", "𓀣", "𓀤", "𓀥", "𓁌", "𓁎",
+ "𓁏"]
try:
- opts, largs = getopt.getopt(args[1:], "h")
+ opts, largs = getopt.getopt(args[1:], "hemn:")
except getopt.GetoptError as err:
print(str(err))
usage(args[0])
- nmoves = 10
-
+ nmoves=10
+ moves=ascii_moves
for o, a in opts:
if o == "-h":
usage(args[0])
+ elif o == "-e":
+ moves=egyptian_moves
elif o == "-n":
nmoves = int(a)
+ elif o == "-m":
+ moves=egyptian_moves+ascii_moves
else:
assert False, "unhandled option"