#!/usr/bin/env bash # 下载 VI 手册里 iPhone 桌面模拟用到的 Apple 素材到 apple/(版权归 Apple,不进 git)。 # - 系统应用图标:App Store 公开查询接口(中国区)里 Apple 自家应用的 1024px 图标 # - 壁纸:iPhone 18 Pro 官方壁纸 Black(主屏幕版,1320×2868),iClarified 转载 # - 机身:Apple Design Resources 的 iPhone 18 Product Bezels,DMG 要先由本人同意许可协议才能打开, # 所以不自动下载,步骤见 README.md # 用法:docs/design/vi/mockup/fetch.sh set -euo pipefail cd "$(dirname "$0")" mkdir -p apple/icons # App Store ID 文件名 APPS=" 1108185179 calendar 1108187098 mail 1069513131 weather 915056765 maps 1110145109 notes 1584215688 clock 1232058109 files 364709193 books 1108187390 music 525463029 podcasts 1108187841 reminders 1069512882 stocks 1110145091 facetime 1242545199 health 1160481993 wallet 1146562112 safari 1514844618 translate 1069512134 voicememos 1110145103 home 1069509450 tips 915249334 shortcuts 6443742539 freeform 6447391597 journal 1383426740 measure 1146560473 messages 1514844621 findmy 1069511488 calculator " ids=$(echo "$APPS" | awk 'NF{print $1}' | paste -sd, -) curl -sSf -m 60 "https://itunes.apple.com/lookup?country=cn&id=$ids" -o apple/lookup.json echo "$APPS" | while read -r id name; do [ -z "$id" ] && continue out="apple/icons/$name.png" [ -f "$out" ] && continue # artworkUrl512 换成 1024px PNG url=$(python3 -I -c "import json,sys; r=[a for a in json.load(open('apple/lookup.json'))['results'] if a['trackId']==$id]; print(r[0]['artworkUrl512'].rsplit('/',1)[0]+'/1024x1024bb.png')") curl -sSf -m 60 -o "$out" "$url" done WALL=apple/wallpaper-black.jpg [ -f "$WALL" ] || curl -sSf -m 600 -o "$WALL" \ "https://www.iclarified.com/files/ios/iClarified-iPhone-18-Pro-Wallpaper/iClarified-iPhone-18-Pro-Wallpaper-Black-Home-Screen.jpg" ls apple apple/icons