New backup 2025-06-19 01:14:41

This commit is contained in:
Penelope Gwen 2025-06-19 01:14:41 -07:00
parent ef134209ed
commit 5ef961cc8b
2 changed files with 22 additions and 0 deletions

21
default/home/.local/bin/rdict Executable file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env bash
search_cache_path="${HOME}/.cache/rdict/searches"
mkdir -p "${search_cache_path}"
search_string=''
for i in $@;do
if [[ -n "${search_string}" ]];then
search_pad=" "
fi
search_string="${search_string}${search_pad}${i}"
done
search_encode="$(printf %s "${search_string}"|jq -sRr @uri)"
search_cache_file="${search_cache_path}/${search_encode}.json"
if [ ! -f "${search_cache_file}" ];then
curl --silent --get "https://api.datamuse.com/words?ml=${search_encode}" | tee "${search_cache_file}" 1&>/dev/null
fi
jq '.[].word' "${search_cache_file}"
#jq -C '.[].word' "${search_cache_file}"

View file

@ -9,3 +9,4 @@ Scripts/create-podman-container-arm.sh
.local/bin/ssi-server
.local/bin/hass-cli
Scripts/iso_updater.sh
.local/bin/rdict