Add manifesto generator to annna. - annna - Annna the nice friendly bot. | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 3720ea8e1c5722206318bfe5f57aba970149afbf | |
parent 103e4f19f37291d864835f0d80dd3c45e7f3a475 | |
Author: Annna Robert-Houdin <[email protected]> | |
Date: Sun, 7 Aug 2022 15:40:12 +0200 | |
Add manifesto generator to annna. | |
Diffstat: | |
M annna-message-common | 4 ++++ | |
A manifesto-gen | 14 ++++++++++++++ | |
2 files changed, 18 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/annna-message-common b/annna-message-common | |
@@ -553,6 +553,10 @@ case "${text}" in | |
bandname="$(bandname-gen | shuf | head -n 1)" | |
annna-say -s "${server}" -c "${channel}" "${bandname}" | |
;; | |
+"${ircuser}, I feel conspicuous.") | |
+ manifestouri="$(manifesto-gen | bitreich-paste)" | |
+ annna-say -s "${server}" -c "${channel}" "Maybe declare this: ${manife… | |
+ ;; | |
"${ircuser}, I am horny.") | |
essaypaste="$(bithub-gen)" | |
annna-say -s "${server}" -c "${channel}" \ | |
diff --git a/manifesto-gen b/manifesto-gen | |
@@ -0,0 +1,14 @@ | |
+#!/bin/bash | |
+ | |
+export PATH="$HOME/annna:$PATH" | |
+manifestodb="$HOME/bin/modules/manifestos/normalized" | |
+ | |
+manifestolength=$(($RANDOM % 56 + 8)) | |
+ | |
+cd $manifestodb | |
+cat * \ | |
+ | shuf \ | |
+ | head -n $manifestolength \ | |
+ | sed "s,$,\n,g" \ | |
+ | fmt -sut | |
+ |