Introduction
Introduction Statistics Contact Development Disclaimer Help
Add Egyptian dance support to annna. - annna - Annna the nice friendly bot.
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit 69bb3614ffb26988dfe3210716e422ee922094ec
parent 2d73a2d37fba885990697e087dc6290cd2dec570
Author: Annna Robert-Houdin <[email protected]>
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(-)
---
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! gophe…
;;
-"${ircuser}, please dance."|"${ircuser}, let us celebrate!"|"\\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!"|…
+ 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: 🖃 "
;;
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"
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.