-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.gen
20 lines (15 loc) · 854 Bytes
/
Makefile.gen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# DIM's API key. insanity_wolf.jpg: it's public anyways.
API_KEY := 5ec01caf6aee450d9dabe646294ffdc9
manifest.json:
path="$$(curl --silent --header 'X-API-Key: $(API_KEY)' https://www.bungie.net/Platform/Destiny2/Manifest/ \
| jq --raw-output .Response.jsonWorldContentPaths.en)"; \
url="https://www.bungie.net$${path}"; \
curl --silent --header 'X-API-Key: $(API_KEY)' --header 'Content-Type: application/json' "$${url}" | jq '.' > $@
names.json: manifest.json $(submodule_path)/src/extract_names.jq
jq -f $(submodule_path)/src/extract_names.jq $< > $@
data:
mkdir data
data/perks.m4: manifest.json $(submodule_path)/src/gen_perks.jq data
jq --raw-output -f $(submodule_path)/src/gen_perks.jq $< > $@
data/weapons.m4: manifest.json $(submodule_path)/src/gen_weapons.jq data
jq --raw-output -f $(submodule_path)/src/gen_weapons.jq $< > $@