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} d=${0:a:h}
dh=${0:a:h: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() { function at-repos-token() {
f=~/.config/atproto/token.json
if [ -z "$host" ] && [ -f $f ];then if [ -z "$host" ] && [ -f $f ];then
host=`cat $f|jq -r ".didDoc.service.[].serviceEndpoint"` host=`cat $f|jq -r ".didDoc.service.[].serviceEndpoint"`
handle=`cat $f|jq -r ".handle"` handle=`cat $f|jq -r ".handle"`
@ -99,6 +120,8 @@ function at-repos-docker() {
} }
function at-repos-bsky-patch() { 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 d_=$d/repos/atproto
p_=$d/105-atproto-services-for-docker.diff p_=$d/105-atproto-services-for-docker.diff
cd $d_ cd $d_
@ -117,12 +140,12 @@ at-repos-pull
at-repos-social-app-icon at-repos-social-app-icon
at-repos-social-app-icon-origin at-repos-social-app-icon-origin
at-repos-social-app-write at-repos-social-app-write
at-repos-bsky-patch
case $1 in echo "[y]docker compose build && up"
bsky) read key
at-repos-bsky-patch case $key in
;; [yY])
docker|d)
at-repos-docker at-repos-docker
;; ;;
esac esac