#!/bin/bash set -eu curl -s "https://raw.githubusercontent.com/manbolo/appicon/master/mask.png" >"icon_mask.png" for app_id in "$@" do metadata=$(curl -s "http://itunes.apple.com/us/lookup?id=$app_id") icon_url=$(echo $metadata | jq -r ".results[0].artworkUrl512") name=$(echo $metadata | jq -r ".results[0].trackCensoredName") icon_base="icon_$name" curl -s "$icon_url" >"$icon_base.png" convert "$icon_base.png" "icon_mask.png" -compose copy-opacity -composite "$icon_base.png" for size in 1024 512 120 114 60 57 do convert "$icon_base.png" -resize "${size}x${size}" "${icon_base}_${size}x${size}.png" done done rm icon_mask.png
./appicon.bash 400274934 598581396
- didn't replicate the slugify
- dependencies: imagemagick, jq
- here without spaces: http://pastebin.com/yBPwHwdk
- to get the same clarity as the python & Obj-C samples, I'd probably be approaching the same length.
10a11 > name=$(echo $name | tr -cd '[:blank:][:alnum:]' | tr -s '[:blank:]' '-' | tr '[:upper:]' '[:lower:]')
- didn't replicate the slugify
- dependencies: imagemagick, jq
- here without spaces: http://pastebin.com/yBPwHwdk
- to get the same clarity as the python & Obj-C samples, I'd probably be approaching the same length.