Files
Exiled-Exchange-2/dataParser/pull-json.sh
Kvan7 835e43a166 v0.1.4 (#166)
* Fix #132

* Features/python script update (#143)

This closes the following issues:

- #67 
- #68 
- #69 
- #70 
- #110 
- #111 
- #112 
- #139

* [Parse Error] - Dualstring bow #60

* Adds starting for localization

* tests yay, this is terrible Add junit tests :( #74

* revert tests cause they were really terrible

* bump gitignore so i dont lose files

* Features/pseudo-pseudo (#93)

* uhhhhhhhhhhhh, maybe pseudo will get support before GGG

* psesudo only ele

* remove git ignored files

* fix ignore

* working tree

* update parser #67

* bump

* more stuff

* maybe working new desc parsing

* Description parser

* Maybe?

* update

* add ko and cmn-Hant

* Add items and pseudo

* push to main

* force utf-16

* moving data

* uh, miss typed a utf 8 for a utf 16

* revert cause that was worse

* Features/moreLocalizationFixes (#148)

* change data files

* ru client strings

* Revert to search by translated name

REVERT THIS LATER ONCE COPY ADVANCED DESC IS BACK

* ru ko and cmn-Hant parse correctly now

* Change Exalted orb to Perfect Jewelers orb

May change again, but just found out about sidekick and since their program was made before creating this, I'm not going to add conflict of logos.

* change from jewelers to div, didn't like how it looked in ui

* Update README

* Update README.md

* Update README.md

* Revert "change from jewelers to div, didn't like how it looked in ui"

This reverts commit b11d33353d.

* Update README.md

* Update localization for PoE2 #66

Functional. Missing some base types in some languages but will make separate issue

* move .ds_store to ds_store (just unhide)

* Builtin browser opens while disabled in settings #103

* [Not Recognized Modifier] - +2 Charm Slots #137

* Remove calls to poeprices for now

* Version Bump to v0.1.4

* Move store and rename

* file move error

* lint + update app_i18n

* [PoE2] Item gets pinned in-game with CTRL+D (auto-hide on) #124

* add fix to pull-json

* final lint fix
2024-12-24 12:45:31 -06:00

46 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"
)
# 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