ai/at
1
0

Compare commits

..

5 Commits

Author SHA1 Message Date
d668aa382b fix 2025-05-05 08:34:28 +09:00
fa603e17d8 fix ozone 2025-05-05 08:22:01 +09:00
81b8b1851d ozone 2025-05-05 08:15:49 +09:00
caae3a63df fix 2025-04-30 00:50:06 +09:00
5b96fb3061 fix scpt 2025-04-26 17:50:28 +09:00
4 changed files with 12 additions and 19 deletions

View File

@@ -61,7 +61,7 @@ case $1 in
verify-icon verify-icon
;; ;;
self-col) self-col)
self-col $2 self-col
;; ;;
*) *)
echo "${help[@]}" echo "${help[@]}"

View File

@@ -219,8 +219,8 @@ delete_game_user() {
function create_game_user() { function create_game_user() {
col=ai.syui.game col=ai.syui.game
rkey=$1 rkey=$1
handle_yui=$handle did=$did
did_yui=$did handle=$handle
pds=`cat $f|jq -r ".didDoc.service.[].serviceEndpoint"|cut -d / -f 3` pds=`cat $f|jq -r ".didDoc.service.[].serviceEndpoint"|cut -d / -f 3`
if [ "$pds" != "syu.is" ];then if [ "$pds" != "syu.is" ];then
pds=bsky.social pds=bsky.social
@@ -249,8 +249,6 @@ function create_game_user() {
if [ "$rkey" = "self" ];then if [ "$rkey" = "self" ];then
cname=manny cname=manny
unset did handle gender unset did handle gender
pds=bsky.social
plc=plc.directory
fi fi
imguri=https://cdn.bsky.app/img/feed_thumbnail/plain/$did_yui/${cid}@jpeg imguri=https://cdn.bsky.app/img/feed_thumbnail/plain/$did_yui/${cid}@jpeg
season=1 season=1
@@ -288,8 +286,8 @@ function create_game_user() {
v1_json=" v1_json="
{ {
\"repo\": \"$handle_yui\", \"repo\": \"$handle\",
\"did\": \"$did_yui\", \"did\": \"$did\",
\"collection\": \"$col\", \"collection\": \"$col\",
\"rkey\": \"$rkey\", \"rkey\": \"$rkey\",
\"record\": { \"record\": {
@@ -315,8 +313,8 @@ json_item="
json=" json="
{ {
\"repo\": \"$handle_yui\", \"repo\": \"$handle\",
\"did\": \"$did_yui\", \"did\": \"$did\",
\"collection\": \"$col\", \"collection\": \"$col\",
\"rkey\": \"$rkey\", \"rkey\": \"$rkey\",
\"record\": { \"record\": {
@@ -347,7 +345,7 @@ if echo $json|jq . ;then
read y read y
if [ "y" = "$y" ];then if [ "y" = "$y" ];then
t=`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 . #echo $t|jq .
#f=~/ai/ue/json/v${version}_${rkey}.json #f=~/ai/ue/json/v${version}_${rkey}.json
#if [ -f $f ];then #if [ -f $f ];then
# get_game_user $rkey >! $f # get_game_user $rkey >! $f

View File

@@ -10,10 +10,6 @@ function at-env() {
did=$did_yui did=$did_yui
created=2025-04-21T00:00:00.323Z created=2025-04-21T00:00:00.323Z
docs_uri=https://docs.bsky.app/docs/api docs_uri=https://docs.bsky.app/docs/api
at_uri=at://$handle/ai.syui.game/ai
did=`echo $at_uri|cut -d / -f 3`
collection=`echo $at_uri|cut -d / -f 4`
rkey=`echo $at_uri|cut -d / -f 5`
d=${0:a:h} d=${0:a:h}
f=~/.config/ai/token.json f=~/.config/ai/token.json
if [ -f $f ];then if [ -f $f ];then
@@ -27,6 +23,10 @@ function at-env() {
plc=plc.syu.is plc=plc.syu.is
pds=$host pds=$host
fi fi
at_uri=at://$handle/ai.syui.game/ai
did=`echo $at_uri|cut -d / -f 3`
collection=`echo $at_uri|cut -d / -f 4`
rkey=`echo $at_uri|cut -d / -f 5`
} }
function at-unset() { function at-unset() {

View File

@@ -1,11 +1,6 @@
#!/bin/zsh #!/bin/zsh
function self-col(){ function self-col(){
if [ -n "$1" ];then
t=`curl -sL "$pds/xrpc/com.atproto.repo.listRecords?repo=$handle&collection=$1"`
echo $t|jq .
exit
fi
col=( col=(
ai.syui.game ai.syui.game
ai.syui.system ai.syui.system