Add onthisday script. - mediawiki-gopher - mediawiki gopher frontend
 (HTM) git clone git://bitreich.org/mediawiki-gopher git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/mediawiki-gopher
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Tags
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit c93839c786c984219cf28b4611d904c97c8ad9de
 (HTM) Author: Christoph Lohmann <20h@r-36.net>
       Date:   Fri,  8 Aug 2025 22:26:28 +0200
       
       Add onthisday script.
       
       Diffstat:
         A get_onthisday_pages.sh              |      21 +++++++++++++++++++++
       
       1 file changed, 21 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/get_onthisday_pages.sh b/get_onthisday_pages.sh
       @@ -0,0 +1,21 @@
       +#!/bin/sh
       +
       +if [ $# -lt 1 ];
       +then
       +        printf "usage: %s mediawikiuri\n" "$(basename "$0")" >&2
       +        exit 1
       +fi
       +
       +mediawikiuri="$1"
       +# https://en.wikipedia.org
       +
       +curl -s "${mediawikiuri}/w/api.php?action=featuredfeed&feed=onthisday&feedformat=atom" \
       +| sfeed \
       +| tail -n 1 \
       +| cut -f 4 \
       +| lynx -stdin -dump -listonly \
       +| grep wiki/ \
       +| sed 's,.*///wiki/\(.*\),\1,' \
       +| head -n 5 \
       +| tail -n +3
       +