Add bithub 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 5ad6802264efced943731ad5dfa7be0de686ff77 DIR parent a8a2c5df492a6664f2a59ed4691cbd6eaea0f8e0 HTML Author: Annna Robert-Houdin <annna@bitreich.org> Date: Wed, 22 Jul 2020 19:51:59 +0200 Add bithub support to annna. Diffstat: M annna-start-services | 2 +- A bithub-gen | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) --- DIR diff --git a/annna-start-services b/annna-start-services @@ -312,7 +312,7 @@ annna_common() { annna-say -c "${channel}" "${bandname}" ;; "${botname}, I am horny.") - essaypaste="$(essay-gen)" + essaypaste="$(bithub-gen)" annna-say -c "${channel}" \ "Here is some intellectual porn for you: ${essaypaste}" ;; DIR diff --git a/bithub-gen b/bithub-gen @@ -0,0 +1,13 @@ +#!/bin/sh + +export PATH="$PATH:/home/annna/bin" + +bithubarchive="/br/gopher/bithub/read_text" +bithubbaseuri="gopher://bitreich.org/0/bithub/read_text" +essayurl="$(essay-gen)" +cd "${bithubarchive}" +essayfile="$(hurl "${essayurl}" | sed -n "2p;" | tr ' /' '__').txt" +hurl "${essayurl}" > "${essayfile}" + +printf "%s/%s\n" "${bithubbaseuri}" "${essayfile}" +