Add band name generator to annna. - annna - Annna the nice friendly bot. | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit baa86bae1828e2f73cef59f7f6d82e6b9ed6a7ce | |
parent 5587f59a33a653bfe7cf2036c38163491e3ca9aa | |
Author: Annna Robert-Houdin <[email protected]> | |
Date: Tue, 21 Jul 2020 13:22:57 +0200 | |
Add band name generator to annna. | |
Diffstat: | |
M annna-start-services | 4 ++++ | |
A bandname-gen | 11 +++++++++++ | |
2 files changed, 15 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/annna-start-services b/annna-start-services | |
@@ -307,6 +307,10 @@ annna_common() { | |
word="$(printf "%s\n" "${text}" | cut -c 21-)" | |
annna-say -c "${channel}" "${word}, pew pew." | |
;; | |
+ "${botname}, please give me a good band name.") | |
+ bandname="$(bandname-gen | shuf | head -n 1)" | |
+ annna-say -c "${channel}" "${bandname}" | |
+ ;; | |
"${botname}, please turn on "*) | |
word="$(printf "%s\n" "${text}" | cut -c 22-)" | |
annna-say -c "${channel}" "☞ ⏻ ${word}" | |
diff --git a/bandname-gen b/bandname-gen | |
@@ -0,0 +1,11 @@ | |
+#!/bin/sh | |
+# | |
+# The web can be used easily. | |
+# If you do not use the web. | |
+# | |
+ | |
+hurl http://www.elsewhere.org/bandname/ \ | |
+ | xml2tsv 2>/dev/null \ | |
+ | grep 'main/article/div/ul/li' \ | |
+ | cut -f 2- | |
+ |