summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsa Venton <asav1410@gmail.com>2020-10-19 12:55:46 +0100
committerAsa Venton <asav1410@gmail.com>2020-10-19 12:55:46 +0100
commit9bace3d0ca99eb71160b20e88a5f4eaf458e6394 (patch)
tree0a540344af20d1e0d2330c1a7b5ca95496fbb8ab
parentff07143deca6191211dac4a1b3ba8f2e448dc73c (diff)
remove oedwordday.sh as the functionality is now included in oeddefine.sh.
-rwxr-xr-xoedwordday.sh31
1 files changed, 0 insertions, 31 deletions
diff --git a/oedwordday.sh b/oedwordday.sh
deleted file mode 100755
index d54d403..0000000
--- a/oedwordday.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/bash
-
-word=$( curl --silent https://www.lexico.com/ | hxnormalize -x | hxselect -i "a.linkword" | grep -o '>.*<' | sed 's/[><]//g')
-appId=
-key=
-language=en-gb
-OPTS='--silent -L -H "app_id: $appId" -H "app_key: $key"'
-
-entriesUrl=https://od-api.oxforddictionaries.com/api/v2/entries/$language/$word
-
-# get definition of headword
-result=$(eval curl $OPTS $entriesUrl)
-ret=$?
-if [ "$ret" -ne 0 ]
-then
- echo "cURL error $ret when fetching."
- exit
-fi
-
-# Get first definition from received json
-definition=$(echo $result | jq '.results[].lexicalEntries[].entries[0].senses[0].definitions[]')
-
-# Get lexical category for first definition
-lexicalCategory=$(echo $result | jq '.results[].lexicalEntries[0].lexicalCategory.text')
-
-# Remove surrounding quotes
-definition=$(echo "${definition:1: -1}")
-lexicalCategory=$(echo "${lexicalCategory:1: -1}")
-
-# Return word, lexical category and first definition.
-echo ${word^}" - "$lexicalCategory" - "$definition