Files
Exiled-Exchange-2/dataParser/pull-json.sh
Kvan7 5e118f92ea v0.1.5 (#195)
* [Traditional Chinese] Translated and fixed common translation issues (#167)

#163

* Gem Sockets + Anoints (#170)

* adding anoints

* add gem sockets

---------

Co-authored-by: zoedel <6480974+zoedel@users.noreply.github.com>

* Update Japanese (#181)

* add chat parser (#183)

* Adds allocates to parser and pushes data files

* Feature/add Japanese support (#191)

* add ja app_i18n.json

* fix translate

* 表現を統一

* add ja client_strings.js

* add japanese support

* Update poe-dat dep

* Uniques seem to work? (#193)

* Fixes use pseudo incorrect includes

* additional tag for chat parsed items

* Features/sockets (#194)

* init for sockets

* add basic for empty sockets into parser

* Update some socket stuff

* Add some rune data

* add soul cors

* Rune socket ui start

* Working for empty cant disable though

* Empty sockets fully working

* divider

* Add basic dropdown placeholders

* disable select

* Focus search working incorrectly #188

* update README

* Update issue templates

* version bump :)

---------

Co-authored-by: Dr3aming <63219151+Dr3am1ng@users.noreply.github.com>
Co-authored-by: zoedel <zoedel@users.noreply.github.com>
Co-authored-by: zoedel <6480974+zoedel@users.noreply.github.com>
Co-authored-by: Kazuma Igarashi <bonz2go2@gmail.com>
Co-authored-by: Oscar <oscarada87@gmail.com>
2024-12-29 19:47:21 -06:00

47 lines
1.3 KiB
Bash

#!/bin/bash
# Array of language codes and their corresponding base URLs
declare -A lang_urls=(
["en"]="https://www.pathofexile.com"
["ru"]="https://ru.pathofexile.com"
["ko"]="https://poe.game.daum.net"
["cmn-Hant"]="https://pathofexile.tw"
["ja"]="https://jp.pathofexile.com"
)
# URLs to fetch JSON from (relative paths)
urls=(
"/api/trade2/data/filters"
"/api/trade2/data/stats"
"/api/trade2/data/items"
"/api/trade2/data/static"
)
# Loop through each language
for lang in "${!lang_urls[@]}"; do
# Directory to save the JSON files for the current language
output_dir="./vendor/json-api/$lang"
# Create output directory if it doesn't exist
mkdir -p "$output_dir"
# Loop through each URL
for relative_url in "${urls[@]}"; do
# Construct the full URL
url="${lang_urls[$lang]}$relative_url"
# Extract the filename from the relative URL
filename=$(basename "$relative_url")
echo "Fetching JSON from: $url for language: $lang"
# Fetch the JSON data and save it to a file
curl -s "$url" -o "$output_dir/$filename.json"
if [ $? -eq 0 ]; then
echo "Saved JSON to: $output_dir/$filename.json"
else
echo "Failed to fetch JSON from: $url"
fi
done
done