commit 75d3a90e3e669fbe45295b5328e97934be408198 Author: NunoSempere Date: Tue Aug 17 00:55:58 2021 +0200 feat: first commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..c216a4c --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +## german_pronoun + +This is a small utility to get the pronoun of a noun in german. Very much a work in progress. diff --git a/german_pronoun.sh b/german_pronoun.sh new file mode 100644 index 0000000..3546b23 --- /dev/null +++ b/german_pronoun.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +function de(){ + dudenURL="https://www.duden.de/rechtschreibung/$1" + fileName="$1.temp" + wget "$dudenURL" --quiet -O "$fileName" + grep -A 1 Wortart "$fileName" | tail -1 | sed 's/.*">//' | sed 's/<.*//' + rm "$fileName" +} + +de $1