Compare commits
3 Commits
d668aa382b
...
c92ad09006
Author | SHA1 | Date | |
---|---|---|---|
c92ad09006 | |||
a57f9eb781 | |||
246f95a00c |
@ -61,7 +61,7 @@ case $1 in
|
||||
verify-icon
|
||||
;;
|
||||
self-col)
|
||||
self-col
|
||||
self-col $2
|
||||
;;
|
||||
*)
|
||||
echo "${help[@]}"
|
||||
|
@ -219,8 +219,8 @@ delete_game_user() {
|
||||
function create_game_user() {
|
||||
col=ai.syui.game
|
||||
rkey=$1
|
||||
did=$did
|
||||
handle=$handle
|
||||
handle_yui=$handle
|
||||
did_yui=$did
|
||||
pds=`cat $f|jq -r ".didDoc.service.[].serviceEndpoint"|cut -d / -f 3`
|
||||
if [ "$pds" != "syu.is" ];then
|
||||
pds=bsky.social
|
||||
@ -249,6 +249,8 @@ function create_game_user() {
|
||||
if [ "$rkey" = "self" ];then
|
||||
cname=manny
|
||||
unset did handle gender
|
||||
pds=bsky.social
|
||||
plc=plc.directory
|
||||
fi
|
||||
imguri=https://cdn.bsky.app/img/feed_thumbnail/plain/$did_yui/${cid}@jpeg
|
||||
season=1
|
||||
@ -286,8 +288,8 @@ function create_game_user() {
|
||||
|
||||
v1_json="
|
||||
{
|
||||
\"repo\": \"$handle\",
|
||||
\"did\": \"$did\",
|
||||
\"repo\": \"$handle_yui\",
|
||||
\"did\": \"$did_yui\",
|
||||
\"collection\": \"$col\",
|
||||
\"rkey\": \"$rkey\",
|
||||
\"record\": {
|
||||
@ -313,8 +315,8 @@ json_item="
|
||||
|
||||
json="
|
||||
{
|
||||
\"repo\": \"$handle\",
|
||||
\"did\": \"$did\",
|
||||
\"repo\": \"$handle_yui\",
|
||||
\"did\": \"$did_yui\",
|
||||
\"collection\": \"$col\",
|
||||
\"rkey\": \"$rkey\",
|
||||
\"record\": {
|
||||
@ -345,7 +347,7 @@ if echo $json|jq . ;then
|
||||
read y
|
||||
if [ "y" = "$y" ];then
|
||||
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
|
||||
#if [ -f $f ];then
|
||||
# get_game_user $rkey >! $f
|
||||
|
@ -10,6 +10,10 @@ function at-env() {
|
||||
did=$did_yui
|
||||
created=2025-04-21T00:00:00.323Z
|
||||
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}
|
||||
f=~/.config/ai/token.json
|
||||
if [ -f $f ];then
|
||||
@ -23,10 +27,6 @@ function at-env() {
|
||||
plc=plc.syu.is
|
||||
pds=$host
|
||||
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() {
|
||||
|
@ -1,6 +1,11 @@
|
||||
#!/bin/zsh
|
||||
|
||||
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=(
|
||||
ai.syui.game
|
||||
ai.syui.system
|
||||
|
Loading…
x
Reference in New Issue
Block a user