Add band name generator 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 baa86bae1828e2f73cef59f7f6d82e6b9ed6a7ce DIR parent 5587f59a33a653bfe7cf2036c38163491e3ca9aa HTML Author: Annna Robert-Houdin <annna@bitreich.org> 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(-) --- DIR 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}" DIR 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- +