feat: first commit

This commit is contained in:
NunoSempere 2021-08-17 00:55:58 +02:00
commit 75d3a90e3e
2 changed files with 14 additions and 0 deletions

3
README.md Normal file
View File

@ -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.

11
german_pronoun.sh Normal file
View File

@ -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