ai/at
ai/at
1
0
This commit is contained in:
syui 2025-03-19 12:04:31 +09:00
parent c119efcaed
commit dc7df561c3
Signed by: syui
GPG Key ID: 5417CFEBAD92DF56

View File

@ -195,6 +195,7 @@ function ai_create_user() {
did=$did_yui
handle=$handle_yui
pds=bsky.social
version=2
#rkey=syui
#img=https://cdn.bsky.app/img/feed_thumbnail/plain/did:plc:4hqjfn7m6n5hno3doamuhgef/bafkreie34pjuc6coenzcdwrgrh4fbacq7bkhsz263g5vpbsqxwaz37kkwy@jpeg
req=com.atproto.repo.putRecord
@ -264,6 +265,12 @@ function ai_create_user() {
}
}"
json_item="
\"coin\": { \"id\": 0, \"count\": 0 },
\"card\": { \"id\": 0, \"count\": 0 },
\"weapon\": { \"id\": 0, \"count\": 0 }
"
json="
{
\"repo\": \"$handle_yui\",
@ -271,7 +278,7 @@ function ai_create_user() {
\"collection\": \"$col\",
\"rkey\": \"$rkey\",
\"record\": {
\"version\": 2,
\"version\": $version,
\"did\": \"$did\",
\"handle\": \"$handle\",
\"player\": {
@ -283,6 +290,9 @@ function ai_create_user() {
\"character\": {
$json
},
\"item\": {
$json_item
},
\"createdAt\": \"${created}\",
\"updatedAt\": \"${created}\"
}
@ -292,7 +302,12 @@ if echo $json|jq . ;then
echo y
read y
if [ "y" = "$y" ];then
curl -sL -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $token" -d $json $url
t=`curl -sL -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $token" -d $json $url`
echo $t|jq .
f=~/ai/ue/json/v${version}_${rkey}.json
if [ -f $f ];then
echo $t|jq . >! $f
fi
fi
fi