ai/at
ai/at
1
0
This commit is contained in:
syui 2025-02-24 16:16:14 +09:00
parent 678a34cfc0
commit da8decca5e
Signed by: syui
GPG Key ID: 5417CFEBAD92DF56

View File

@ -13,10 +13,31 @@ function at-repos-env() {
)
d=${0:a:h}
dh=${0:a:h:h}
f=~/.config/atproto/token.json
}
function at-repos-json() {
j="{
\"did\": \"did:plc:6qyecktefllvenje24fcxnie\",
\"didDoc\": {
\"service\": [
{
\"serviceEndpoint\": \"https://syu.is\"
}
]
},
\"handle\": \"ai.syu.is\",
\"accessJwt\": \"xxx\"
}"
if [ ! -f "$f" ];then
mkdir -p ~/.config/atproto
echo $j >> $f
fi
echo $f
}
function at-repos-token() {
f=~/.config/atproto/token.json
if [ -z "$host" ] && [ -f $f ];then
host=`cat $f|jq -r ".didDoc.service.[].serviceEndpoint"`
handle=`cat $f|jq -r ".handle"`
@ -99,6 +120,8 @@ function at-repos-docker() {
}
function at-repos-bsky-patch() {
f=$d/repos/atproto/services/bsky/api.js
curl -sL https://raw.githubusercontent.com/bluesky-social/atproto/refs/heads/main/services/bsky/api.js -o $f
d_=$d/repos/atproto
p_=$d/105-atproto-services-for-docker.diff
cd $d_
@ -117,12 +140,12 @@ at-repos-pull
at-repos-social-app-icon
at-repos-social-app-icon-origin
at-repos-social-app-write
at-repos-bsky-patch
case $1 in
bsky)
at-repos-bsky-patch
;;
docker|d)
echo "[y]docker compose build && up"
read key
case $key in
[yY])
at-repos-docker
;;
esac