nixpkgs/pkgs/misc/translatelocally-models/update.sh
pacien 3f9ea32279 translatelocally-models: init 2023-10-02
This adds `pkgs.translatelocally-models.*` providing machine
translation models which can be used with `pkgs.translatelocally`.

`translatelocally-models.is-en-tiny` is marked as broken because its
archive is missing.
2023-12-15 21:36:30 +01:00

15 lines
312 B
Bash
Executable File

#!/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"