diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-03-04 01:58:45 +0100 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-03-04 01:58:45 +0100 |
commit | 83b8149f4b3fb48a030c4d0186100a5dd9af0acc (patch) | |
tree | 3c5c3ec80e6d9b55f39595ae311f111234febc46 /bin | |
parent | 2c751b767fbccf2bb7573012cbf270a11325794b (diff) |
Add wd
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/extra/wd | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/bin/extra/wd b/bin/extra/wd new file mode 100755 index 0000000..1aa2c6e --- /dev/null +++ b/bin/extra/wd @@ -0,0 +1,14 @@ +#!/bin/sh + +### Word Definition +# Based on https://askubuntu.com/questions/191125/is-there-an-offline-command-line-dictionary +# +### Installation +# > sudo mkdir -p /usr/share/stardict/dic/ +## Get the dictionaries +# > wget https://web.archive.org/web/20140428003644/http://abloz.com/huzheng/stardict-dic/dict.org/stardict-dictd_www.dict.org_gcide-2.4.2.tar.bz2 +# > wget https://web.archive.org/web/20140428004049/http://abloz.com/huzheng/stardict-dic/misc/stardict-xfardic-gnu-linux-2.4.2.tar.bz2 + +sdcv -nj "$1" | + jq -r '.[].definition' | + sed -e '/^$/d;s/^[^ ].*$/\o033[1;4;38m&\o033[0m/' |