fix scpt
This commit is contained in:
parent
cc27f367ea
commit
5b96fb3061
@ -146,7 +146,7 @@ function at-repos-social-app-patch() {
|
||||
|
||||
function at-repos-docker() {
|
||||
cd $d
|
||||
sudo docker compose build && sudo docker compose up -d
|
||||
docker compose build && docker compose up -d
|
||||
}
|
||||
|
||||
at-repos-env
|
||||
|
@ -49,9 +49,9 @@ case $1 in
|
||||
source $d/src/ai/syui/game/character.zsh
|
||||
create_game_user $2
|
||||
;;
|
||||
create-item)
|
||||
create-yui)
|
||||
source $d/src/ai/syui/game/character.zsh
|
||||
create_item
|
||||
create_yui
|
||||
;;
|
||||
get-game-user)
|
||||
source $d/src/ai/syui/game/character.zsh
|
||||
@ -61,6 +61,9 @@ case $1 in
|
||||
source $d/src/ai/syui/game/character.zsh
|
||||
delete_game_user $2 $3
|
||||
;;
|
||||
verify-icon)
|
||||
verify-icon
|
||||
;;
|
||||
*)
|
||||
echo "${help[@]}"
|
||||
echo "${host[@]}"
|
||||
|
@ -210,6 +210,7 @@ delete_game_user() {
|
||||
req=com.atproto.repo.DeleteRecord
|
||||
url=https://$pds/xrpc/$req
|
||||
repo=$did
|
||||
#repo=did:plc:6qyecktefllvenje24fcxnie
|
||||
json="{\"collection\":\"$col\", \"rkey\":\"$rkey\", \"repo\":\"$repo\"}"
|
||||
echo $json
|
||||
curl -sL -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $token" -d $json $url
|
||||
@ -350,8 +351,8 @@ if echo $json|jq . ;then
|
||||
fi
|
||||
}
|
||||
|
||||
function create_item() {
|
||||
col=ai.syui.item
|
||||
function create_yui() {
|
||||
col=ai.syui.yui
|
||||
rkey=self
|
||||
did=$did_yui
|
||||
handle=$handle_yui
|
||||
@ -363,10 +364,13 @@ function create_item() {
|
||||
url=https://$pds/xrpc/$req
|
||||
cid=bafkreia3huw2gdenqatoobx3hcft74chced46bw4znfgepo5aenegobkri
|
||||
imguri=https://cdn.bsky.app/img/feed_thumbnail/plain/$did_yui/${cid}@jpeg
|
||||
imgurl=https://git.syui.ai/ai/ai/raw/branch/main/item/
|
||||
imgurl=https://git.syui.ai/ai/ai/raw/branch/main/img/item/card
|
||||
json_card=" \"id\": $id, \"name\": \"$name\", \"img\": \"${imgurl}/${id}.webp\""
|
||||
json_card=`curl -sL https://git.syui.ai/ai/ai/raw/branch/main/item/card.json|jq .`
|
||||
json_weapon=`curl -sL https://git.syui.ai/ai/ai/raw/branch/main/item/weapon.json|jq .`
|
||||
json_card=`curl -sL https://git.syui.ai/ai/ai/raw/branch/main/json/card.json|jq ".[]"`
|
||||
json_weapon=`curl -sL https://git.syui.ai/ai/ai/raw/branch/main/json/weapon.json|jq ".[]"`
|
||||
json_system=`curl -sL https://git.syui.ai/ai/ai/raw/branch/main/json/system.json|jq ".[]"`
|
||||
json_character=`curl -sL https://git.syui.ai/ai/ai/raw/branch/main/json/character.json|jq ".[]"`
|
||||
json_ability=`curl -sL https://git.syui.ai/ai/ai/raw/branch/main/json/ability.json|jq ".[]"`
|
||||
json="
|
||||
{
|
||||
\"repo\": \"$handle_yui\",
|
||||
@ -376,6 +380,9 @@ function create_item() {
|
||||
\"record\": {
|
||||
\"card\": ${json_card},
|
||||
\"weapon\": ${json_weapon},
|
||||
\"system\": ${json_system},
|
||||
\"character\": ${json_character},
|
||||
\"ability\": ${json_ability},
|
||||
\"createdAt\": \"${created}\",
|
||||
\"updatedAt\": \"${created}\"
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ function at-env() {
|
||||
did_syui=did:plc:uqzpqmrjnptsxezjx4xuh2mn
|
||||
handle=$handle_yui
|
||||
did=$did_yui
|
||||
created=2020-01-01T00:00:00+09:00
|
||||
created=2025-04-21T00:00:00.323Z
|
||||
at_uri=at://$did_yui/ai.syui.game.user/syui
|
||||
docs_uri=https://docs.bsky.app/docs/api
|
||||
did=`echo $at_uri|cut -d / -f 3`
|
||||
@ -173,3 +173,32 @@ function at-profile() {
|
||||
url="${host}${req}?actor=$did"
|
||||
curl -sL -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $token" $url|jq .
|
||||
}
|
||||
|
||||
function verify-icon() {
|
||||
syuisadmin_handle=ai.syu.is
|
||||
syuisadmin_did=did:plc:6qyecktefllvenje24fcxnie
|
||||
#rkey=
|
||||
col=app.bsky.graph.verification
|
||||
handle=syui.syu.is
|
||||
subject=did:plc:vzsvtbtbnwn22xjqhcu3vd6y
|
||||
displayName=syui
|
||||
req=/xrpc/com.atproto.repo.createRecord
|
||||
url=${host}${req}
|
||||
json="
|
||||
{
|
||||
\"repo\": \"$syuisadmin_handle\",
|
||||
\"did\": \"$syuisadmin_did\",
|
||||
\"collection\": \"$col\",
|
||||
\"record\": {
|
||||
\"subject\": \"$subject\",
|
||||
\"handle\": \"$handle\",
|
||||
\"displayName\": \"$displayName\",
|
||||
\"createdAt\": \"${created}\"
|
||||
}
|
||||
}"
|
||||
|
||||
if echo $json|jq . ;then
|
||||
t=`curl -sL -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $token" -d $json $url`
|
||||
echo $t
|
||||
fi
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user