Add new bitreich gopher wikipedia gateway. - 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 2db2ce130cd0047cc06672aa359c8ac250da8738
DIR parent c6c88e2afe1ff53837ee109555e372c661337958
HTML Author: Annna Robert-Houdin <annna@bitreich.org>
Date: Fri, 2 Jan 2026 15:00:50 +0100
Add new bitreich gopher wikipedia gateway.
Diffstat:
M annna-message-common | 7 +++++++
M modules/radio/radio-channel-servic… | 2 --
M modules/radio/radio-random-channel… | 4 +---
3 files changed, 8 insertions(+), 5 deletions(-)
---
DIR diff --git a/annna-message-common b/annna-message-common
@@ -229,6 +229,13 @@ case "${IRC_PRIVMSG_TEXT}" in
tid="$(printf "%s\n" "${uri}" | sed 's,.*status/\([0-9]*\)$,\1,')"
# X.com/Twitter sucks and hates users.
nocuri=1;;
+ *en.wikipedia.org/wiki/*)
+ if ! regeximatch "$uri" '\.(jpg,bmp,gif,png,tiff,avi,mp4,webm,mkv,pdf,ps,eps)$';
+ then
+ nuri="$(printf '%s\n' "${uri}" | sed -Ee "s;http.*wikipedia\.org/wiki;gophers://bitreich.org/0/pedia/txt;" -e "s;(\?|#).*$;;")"
+ nuris="${nuris} $(printf 'txt: %s' "${nuri}")"
+ nocuri=1
+ fi;;
*.wikipedia.org/wiki/*)
if ! regeximatch "$uri" '\.(jpg,bmp,gif,png,tiff,avi,mp4,webm,mkv,pdf,ps,eps)$';
then
DIR diff --git a/modules/radio/radio-channel-service.sh b/modules/radio/radio-channel-service.sh
@@ -1,7 +1,5 @@
#!/bin/sh
-set -x
-
export PATH="/home/annna/bin:$PATH"
while annna-alive;
DIR diff --git a/modules/radio/radio-random-channel-cronjob.sh b/modules/radio/radio-random-channel-cronjob.sh
@@ -1,7 +1,5 @@
#!/bin/sh
-set -x
-
randomuri="$(curl -s gophers://bitreich.org/1/radio/lawn/random \
| head -n 1 \
| cut -f 2 \
@@ -15,7 +13,7 @@ mpc consume off >/dev/null 2>&1
mpc play >/dev/null 2>&1
#mpc playlist
# Be sure there is only one thing in the playlist.
-mpc crop #>/dev/null 2>&1
+mpc crop >/dev/null 2>&1
#mpc playlist
# Add new randum radio at position 2.
printf "%s\n" "${randomuri}" | mpc add >/dev/null 2>&1