From 5ef0af3a05c14d8d2f3b57acff4cd11743a268c3 Mon Sep 17 00:00:00 2001 From: syui Date: Fri, 27 Jun 2025 20:18:07 +0000 Subject: [PATCH] =?UTF-8?q?social-app=20=E3=82=92=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- social-app.-.md | 55 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/social-app.-.md b/social-app.-.md index 6aaf289..566a20f 100644 --- a/social-app.-.md +++ b/social-app.-.md @@ -110,3 +110,58 @@ curl -sL -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $t 2. req(リクエスト): `https://bsky.syu.is/img/avatar_thumbnail/*` 3. path(パス): `/img/avatar_thumbnail/*` -> `/img/avatar/${1}` +## script + +```sh +function at-repos-social-app-icon() { + curl -sL https://raw.githubusercontent.com/bluesky-social/social-app/main/src/view/icons/Logotype.tsx -o $d/repos/social-app/src/view/icons/Logotype.tsx + if [ -d $d/icons ];then + mkdir -p $d/icons + fi + cp -rf $d/repos/social-app/src/view/icons/Logotype.tsx $d/icons/ +} + +function at-repos-social-app-icon-origin() { + curl -sL $icon -o $d/icons/Logotype.tsx +} + +function at-repos-social-app-write() { + did_admin=did:plc:z72i7hdynmk6r22z27h6tvur + + dt=$d/repos/social-app/src + cd $dt + + t=(bsky.social bsky.app) + for tt in "${t[@]}"; do + escaped_tt=$(echo "$tt" | sed 's/\./\\./g') + grep -R "$escaped_tt" . | cut -d : -f 1 | sort -u | xargs -r sed -i "s/${tt}/${pds}/g" + done + + t=(api public.api public.api.bsky public.bsky) + for tt in "${t[@]}"; do + grep -R "${tt}\.${pds}" . | cut -d : -f 1 | sort -u | xargs -r sed -i "s/${tt}\.${pds}/bsky.${pds}/g" + done + + t=(cardyb events status) + for tt in "${t[@]}"; do + grep -R "${tt}\.${pds}" . | cut -d : -f 1 | sort -u | xargs -r sed -i "s/${tt}\.${pds}/${tt}.bsky.app/g" + done + + f=$dt/lib/strings/url-helpers.ts + sed -i 's#`https://go\.syu\.is/redirect\?u=\${encodeURIComponent(url)}`#url#g' $f + + f=$dt/state/geolocation.tsx + sed -i 's#https://syu\.is/ipcc#https://bsky\.app/ipcc#g' $f + + f=$dt/view/icons/Logotype.tsx + o=$d/icons/Logotype.tsx + cp -rf $o $f + + f=$dt/view/com/util/UserAvatar.tsx + curl -sL https://raw.githubusercontent.com/bluesky-social/social-app/refs/heads/main/src/view/com/util/UserAvatar.tsx -o $f + sed -i "s#/img/avatar/plain/#https://bsky.${pds}/img/avatar/plain/#g" $f + sed -i "s#/img/avatar_thumbnail/plain/#https://bsky.${pds}/img/avatar/plain/#g" $f + sed -i "s#source={{uri: avatar}}#source={{ uri: hackModifyThumbnailPath(avatar, 1 > 0), }}#g" $f + grep -R $did_admin .|cut -d : -f 1|sort -u|xargs sed -i "s/${did_admin}/${did}/g" +} +``` \ No newline at end of file