Do any know of a tool you can put in either alliance ID or name and have it automatic resolve all member corps of that alliance into corp ID’s and then automatic download the logo’s for each corp?
Simple bash script to download corporation icons (all 3 sizes) given list of alliance_ids.
Usage
- Copy paste code into notepad, save as
iconDownloader.sh
- Run
chmod +x ./iconDownlader.sh
to make it executable - Install curl, wget, and jq if you do not already have them, can google for how to do it depending on your OS
- Edit the list of alliance_ids on line 7
- run the script using
./iconDownloader.sh
#!/bin/bash # Downloads corporation icons given a list of alliance_ids # into alliance_id -> corporation_id -> icon file structure # Requires curl, wget, and jq # Space seperated list of alliance_ids to get corporation icons for alliance_ids=(99002938 1354830081) mkdir ./icons cd ./icons for alliance_id in "${alliance_ids[@]}"; do mkdir $alliance_id cd ./$alliance_id echo "Fetching icons for "$alliance_id"'s corporations" corporations=$(curl -s "https://esi.tech.ccp.is/v1/alliances/$alliance_id/corporations/") for corporation_id in $(echo "${corporations}" | jq '.[]'); do mkdir ./$corporation_id cd ./$corporation_id echo "Downloading icons for corporation: "$corporation_id icons=$(curl -s "https://esi.tech.ccp.is/v1/corporations/$corporation_id/icons/") icon_url=$(echo "${icons}" | jq -r '.px256x256') for icon_path in $(echo "${icons}" | jq -r '.[]'); do wget -q $icon_path done cd ../ done cd ../ done
1 Like
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.