about summary refs log tree commit diff
path: root/nixpkgs/pkgs/misc/translatelocally-models/update.sh
blob: 4c75508211b6f43f59bb6c73689a6bdccdeeb213 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/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"