toki pona dictionary stuff
This commit is contained in:
parent
1e42e3f8b2
commit
ad13f0779e
12
toki/toki_common
Executable file
12
toki/toki_common
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# this could potentially leave a user with two jasima.json files post config
|
||||||
|
# change but that's fine
|
||||||
|
if test -z "$JASIMA"
|
||||||
|
then test -n "$XDG_CONFIG_HOME" \
|
||||||
|
&& JASIMA="$XDG_CONFIG_HOME"/tokipona/jasima.json \
|
||||||
|
|| JASIMA="$HOME"/.tokipona/jasima.json
|
||||||
|
fi
|
||||||
|
|
||||||
|
test -n "$JASIMA_URL" \
|
||||||
|
|| JASIMA_URL=https://linku.la/jasima/data.json
|
17
toki/toki_lipunimi
Executable file
17
toki/toki_lipunimi
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
test -e toki_common \
|
||||||
|
&& . ./toki_common \
|
||||||
|
|| . toki_common
|
||||||
|
|
||||||
|
test -n "$2" \
|
||||||
|
&& printf 'Usage: %s (lipu)\n' >&2 \
|
||||||
|
&& exit 64 \
|
||||||
|
|| true # syexits(3) EX_USAGE
|
||||||
|
|
||||||
|
test -n "$1" \
|
||||||
|
&& JASIMA="$1"
|
||||||
|
|
||||||
|
dd <"$JASIMA" 2>/dev/null
|
19
toki/toki_update
Executable file
19
toki/toki_update
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
test -e toki_common \
|
||||||
|
&& . ./toki_common \
|
||||||
|
|| . toki_common
|
||||||
|
|
||||||
|
test -n "$2" \
|
||||||
|
&& printf 'Usage: %s (lipu nimi)\n' >&2 \
|
||||||
|
&& exit 64 \
|
||||||
|
|| true # syexits(3) EX_USAGE
|
||||||
|
|
||||||
|
test -n "$1" \
|
||||||
|
&& JASIMA_URL="$1"
|
||||||
|
|
||||||
|
mkdir -p "$(dirname "$JASIMA")"
|
||||||
|
|
||||||
|
curl "$JASIMA_URL" -o "$JASIMA"
|
Loading…
Reference in New Issue
Block a user