nixpkgs/pkgs/misc/translatelocally-models/update.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
312 B
Bash
Raw Normal View History

#!/usr/bin/env nix-shell
#! nix-shell -i bash -p curl -p jq
set -eu -o pipefail
curl https://translatelocally.com/models.json \
| jq '.models | map(with_entries(select([.key] | inside([
"name",
"code",
"version",
"url",
"checksum"
]))))' \
> "$(dirname "$0")/models.json"