ai/at
ai/at
1
0
This commit is contained in:
syui 2025-02-24 14:01:27 +09:00
parent 2be8827f14
commit 01b724e0c3
Signed by: syui
GPG Key ID: 5417CFEBAD92DF56

View File

@ -3,6 +3,7 @@
function at-repos-env() {
host=syu.is
did=did:plc:6qyecktefllvenje24fcxnie
icon=https://git.syui.ai/ai/at/raw/branch/main/icons/Logotype.tsx
repos=(
https://github.com/did-method-plc/did-method-plc
https://github.com/bluesky-social/indigo
@ -21,6 +22,7 @@ function at-repos-token() {
handle=`cat $f|jq -r ".handle"`
did=`cat $f|jq -r ".did"`
token=`cat $f|jq -r ".token"`
host=${host##*/}
fi
name=${host%%.*}
domain=${host##*.}
@ -56,7 +58,6 @@ function at-repos-pull() {
fi
done
cd $d
echo "docker compose build && docker compose up -d"
}
function at-repos-social-app-icon() {
@ -68,7 +69,15 @@ function at-repos-social-app-icon() {
}
function at-repos-social-app-icon-origin() {
curl -sL https://git.syui.ai/ai/at/raw/branch/main/icons/Logotype.tsx -o $d/icons/Logotype.tsx
curl -sL $icon -o $d/icons/Logotype.tsx
}
function at-repos-social-app-rm() {
dt=$d/repos/social-app/src
f=$dt/view/com/util/UserAvatar.tsx
rm $f
f=$dt/lib/constants.ts
rm $f
}
function at-repos-social-app-write() {
@ -76,9 +85,10 @@ function at-repos-social-app-write() {
dt=$d/repos/social-app/src
cd $dt
grep -R bsky.social .|cut -d : -f 1|sort -u|xargs sed -i "s/bsky.social/${domain}/g"
grep -R bsky.app .|cut -d : -f 1|sort -u|xargs sed -i "s/bsky.app/web.${domain}/g"
sed -i "s/public.api.web/bsky/g" ./lib/constants.ts
grep -R bsky.social .|cut -d : -f 1|sort -u|xargs sed -i "s/bsky.social/${host}/g"
grep -R bsky.app .|cut -d : -f 1|sort -u|xargs sed -i "s/bsky.app/web.${host}/g"
f=$dt/lib/constants.ts
sed -i "s/public.api.web/bsky/g" $f
f=$dt/view/icons/Logotype.tsx
o=$d/icons/Logotype.tsx
cp -rf $o $f
@ -86,21 +96,27 @@ function at-repos-social-app-write() {
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://cdn.bsky.app/img/avatar/plain/#g" $f
sed -i "s#/img/avatar_thumbnail/plain/#https://bsky.${domain}/img/avatar/plain/#g" $f
sed -i "s#/img/avatar_thumbnail/plain/#https://bsky.${host}/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"
}
function at-repos-docker() {
cd $d
docker compose build && docker compose up -d
}
at-repos-env
at-repos-token
at-repos-clone
at-repos-social-app-rm
at-repos-pull
at-repos-social-app-icon
at-repos-social-app-icon-origin
at-repos-social-app-write
case $1 in
icon|i)
at-repos-social-app-icon-origin
docker|d)
at-repos-docker
;;
esac
at-repos-social-app-write