53 lines
1.1 KiB
Bash
Executable File
53 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
#found on eveeye.com
|
|
declare -a EveEye=(
|
|
# jumprange.json
|
|
# kspace.json
|
|
# ships.json
|
|
# statics_constellations.json
|
|
# statics_systems.json
|
|
# supersearch_agt.json
|
|
# supersearch_rcs.json
|
|
# supersearch_sta.json
|
|
# wormholes.json
|
|
# wspace.json
|
|
)
|
|
|
|
declare -a deps=(
|
|
jq
|
|
wget
|
|
)
|
|
|
|
|
|
for dep in "${deps[@]}"; do
|
|
hash ${dep} 2>/dev/null
|
|
if [ $? -gt 0 ]; then
|
|
echo "error.. please install ${dep} to use this script" ; exit 111
|
|
fi
|
|
done
|
|
|
|
set -e
|
|
# NOT elegant but at least gets us something readable(ish)
|
|
for f in "${EveEye[@]}"; do
|
|
echo https://eveeye.com/mapdata/${f}
|
|
wget -q https://eveeye.com/mapdata/${f} -O ${f}.tmp || (echo ERROR with ${f} ; rm ${f}.tmp ; exit 1)
|
|
cat ${f}.tmp | jq . > ${f}
|
|
rm ${f}.tmp
|
|
done
|
|
|
|
|
|
declare -a EsiData=(
|
|
v1/sovereignty/campaigns/
|
|
v1/sovereignty/structures/
|
|
v1/sovereignty/map/
|
|
v1/incursions/
|
|
v1/fw/systems/
|
|
v1/sovereignty/structures/
|
|
)
|
|
|
|
for f in "${EsiData[@]}"; do
|
|
newname="esi_$(echo $f | sed 's+v1/++g; s+/+_+g; s+_$++g').json"
|
|
wget -q https://esi.evetech.net/v1/fw/systems/ -O "${newname}" || (echo ERROR with ${f} ; rm ${f}.tmp ; exit 1)
|
|
done
|