This page is a work in progress with no schedule for updates. Just thought I'd pass on things that I found useful.

Precis -- Searches for an article on Wikipedia and prints out the summary paragraph at the beginning

#!/bin/bash #This is very much a script in progress. One that often chokes, too. #usage: ./precis [search term(s)] input=$(echo $* | tr ' ' '_') string=$(curl -s "https://en.wikipedia.org/w/api.php?action=query&format=json&prop=extracts&titles=$input&formatversion=2&exintro=1&explaintext=1&exsectionformat=plain" \ | sed -e 's:\\n:\n:g; s:\\":\":g; s:\"\}\]\}\}::g') printf "\n" echo ${string#*extract\":\"} printf "\n" ~~~~~~~~~~~~~~~~~~~~~~~~~
~thumos thumos@tilde.club Feb. 2023