commit 609ed1d06a072edfb70a1b925a07612228f9accb parent 81924295da94f653787ce2dc94aa0b9af1c11d0d Author: Alex Balgavy <alex@balgavy.eu> Date: Mon, 13 Jun 2022 00:53:01 +0200 dehet: a script to tell me which lidwoord to use in dutch Diffstat:
A | scripts/dehet | | | 15 | +++++++++++++++ |
1 file changed, 15 insertions(+), 0 deletions(-)
diff --git a/scripts/dehet b/scripts/dehet @@ -0,0 +1,14 @@ +#!/bin/sh +# Tells you whether a word in Dutch is "de" or "het". Uses welklidwoord.nl as a +# backend. +checkdeps() { + for com in "$@"; do + command -v "$com" >/dev/null 2>&1 \ + || { printf '%s required but not found.\n' "$com" >&2 && exit 1; } + done +} +checkdeps curl pup tr + +curl -sL https://welklidwoord.nl/"$1" \ + | pup 'h2.nieuwH2 > span text{}' \ + | tr -dC '[[:alpha:]]'+ \ No newline at end of file