added oed api handling for improved quality

This commit is contained in:
2021-11-01 23:01:34 +01:00
parent ca6f54625b
commit 43f96993e9
3 changed files with 1915 additions and 0 deletions

13
oxford_api/wrapper Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
file="$1"
oed_app_id="$(pass show GRE/oxforddictionary_api | grep -E '^app_id' | cut -d' ' -f2)"
oed_app_key="$(pass show GRE/oxforddictionary_api | grep -E '^app_key' | cut -d' ' -f2)"
while read -r line
do
echo "word: $word"
no="$(echo "$line" | cut -f1)"
word="$(echo "$line" | cut -f2)"
json="$(./oed_get_json "$word" "$oed_app_id" "$oed_app_key")"
echo "$json" > json/"$no"_"$word".json
done < "$file"