💾 Archived View for dimension.sh › ~textmonger › 2023-07-14-01-wikipedia-haste.gmi captured on 2023-07-22 at 16:20:06. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
I threw these couple scripts together to quickly satisfy wondering what Wikipedia has per specified search/query terms.
#! /usr/bin/env lua if arg[1] then local query = 'https://en.wikipedia.org/w/index.php?search=' .. table.concat(arg, '%20') .. '~' if os.getenv('TERMINAL') then os.execute('el ' .. query) else os.execute('www-browser --client --url ' .. query) end else print('=== missing query arguments') end
NOTES:
- "el" (in "os.execute('el ' .. query)") is another script of mine wrapping 'elinks' for reason(s) I can't remember.
- "www-browser" is a command I discovered in my Chromebook's Linux environment (/usr/bin/www-browser) presented by the Chromebook "Terminal" app.
TERMINAL=y w $*