fix
This commit is contained in:
parent
ecd1c1cd97
commit
add6d5499e
@ -1,5 +1,43 @@
|
|||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
|
|
||||||
|
handle_yui=yui.syui.ai
|
||||||
|
handle_syui=syui.ai
|
||||||
|
did_yui=did:plc:4hqjfn7m6n5hno3doamuhgef
|
||||||
|
did_syui=did:plc:uqzpqmrjnptsxezjx4xuh2mn
|
||||||
|
token_yui=`cat ~/.config/ai/token.json|jq -r .accessJwt`
|
||||||
|
host=bsky.social
|
||||||
|
created=2001-01-01T00:00:00+09:00
|
||||||
|
|
||||||
|
character=(
|
||||||
|
ai
|
||||||
|
manny
|
||||||
|
quinn
|
||||||
|
chinese
|
||||||
|
kirin
|
||||||
|
leviathan
|
||||||
|
phoenix
|
||||||
|
wyvern
|
||||||
|
cerberus
|
||||||
|
dragon
|
||||||
|
kitsune
|
||||||
|
pegasus
|
||||||
|
)
|
||||||
|
|
||||||
|
img=(
|
||||||
|
bafkreie34pjuc6coenzcdwrgrh4fbacq7bkhsz263g5vpbsqxwaz37kkwy
|
||||||
|
bafkreie34pjuc6coenzcdwrgrh4fbacq7bkhsz263g5vpbsqxwaz37kkwy
|
||||||
|
bafkreie34pjuc6coenzcdwrgrh4fbacq7bkhsz263g5vpbsqxwaz37kkwy
|
||||||
|
bafkreidlealfybajqzwv5eoz4jshnsijc2vnktlhpw4ph47krwj6aigqby
|
||||||
|
bafkreiegpqedlrfa4ljhssdnkrr5hyd5huy2xhh2zszj5wq2wuuzejggmq
|
||||||
|
bafkreig6vszkx3c4dcortjwfsz6sa6zwqgj7zpxj4lxfrrkwql4xhiu5ou
|
||||||
|
bafkreich7fsumke2yvumvixkruonzrcevk3f6g2cntzfwdn4n2c2vox5dm
|
||||||
|
bafkreiacjvagsekhiiljz3j237b6klrt6pkptxljt7kltprgg5276gv25q
|
||||||
|
bafkreihpni4lp55jysalcntulzal5rbhidtbseanlucpyucagzxmv6xj24
|
||||||
|
bafkreia3huw2gdenqatoobx3hcft74chced46bw4znfgepo5aenegobkri
|
||||||
|
bafkreidy74aieb6ie646xhosginox5zbnbnrtd76cnt4pbn73hrxgfnple
|
||||||
|
bafkreifnbfj27fr6nv7qeqqmwdibf7qrw4lauvzoknw5hexbifmwqt6kmq
|
||||||
|
)
|
||||||
|
|
||||||
function download_character_icon(){
|
function download_character_icon(){
|
||||||
|
|
||||||
t=(
|
t=(
|
||||||
@ -38,10 +76,7 @@ for i in $t; do
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
handle_yui=yui.syui.ai
|
|
||||||
did_yui=did:plc:4hqjfn7m6n5hno3doamuhgef
|
|
||||||
token_yui=`cat ~/.config/ai/token.json|jq -r .accessJwt`
|
|
||||||
host=bsky.social
|
|
||||||
|
|
||||||
case $OSTYPE in
|
case $OSTYPE in
|
||||||
darwin*)
|
darwin*)
|
||||||
@ -164,6 +199,108 @@ json="{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#download_character_icon
|
function ai_create_user() {
|
||||||
create_game_character
|
|
||||||
|
|
||||||
|
col=ai.syui.game.user
|
||||||
|
rkey=ai
|
||||||
|
did=$did_yui
|
||||||
|
handle=$handle_yui
|
||||||
|
#rkey=syui
|
||||||
|
#img=https://cdn.bsky.app/img/feed_thumbnail/plain/did:plc:4hqjfn7m6n5hno3doamuhgef/bafkreie34pjuc6coenzcdwrgrh4fbacq7bkhsz263g5vpbsqxwaz37kkwy@jpeg
|
||||||
|
req=com.atproto.repo.putRecord
|
||||||
|
url=https://$host/xrpc/$req
|
||||||
|
|
||||||
|
for ((i=1; i<=${#character}; i++)); do
|
||||||
|
|
||||||
|
cname=${character[$i]}
|
||||||
|
cid=${img[$i]}
|
||||||
|
imguri=https://cdn.bsky.app/img/feed_thumbnail/plain/$did_yui/${cid}@jpeg
|
||||||
|
echo $imguri
|
||||||
|
echo $i $character $cname
|
||||||
|
season=1
|
||||||
|
group=test
|
||||||
|
lv=1
|
||||||
|
hp=100
|
||||||
|
exp=0
|
||||||
|
rank=0
|
||||||
|
mode=0
|
||||||
|
attack=0
|
||||||
|
attack_post=0
|
||||||
|
critical=0
|
||||||
|
critical_d=0
|
||||||
|
|
||||||
|
case $cname in
|
||||||
|
ai)
|
||||||
|
group=origin
|
||||||
|
season=0
|
||||||
|
mode=2
|
||||||
|
;;
|
||||||
|
manny|quinn)
|
||||||
|
group=test
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
group=fantasy
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
jc="\"$cname\": { \"group\": \"$group\", \"season\": $season, \"img\": \"$imguri\", \"lv\": $lv, \"exp\": $exp, \"hp\": $hp, \"rank\": $rank, \"mode\": $mode, \"attack\": $attack, \"attack_post\": $attack_post, \"critical\": $critical, \"critical_d\": $critical_d }"
|
||||||
|
|
||||||
|
if [ $#character -ne $i ];then
|
||||||
|
jc=${jc},
|
||||||
|
fi
|
||||||
|
|
||||||
|
json=${json}${jc}
|
||||||
|
|
||||||
|
done
|
||||||
|
json="
|
||||||
|
{
|
||||||
|
\"repo\": \"$handle_yui\",
|
||||||
|
\"did\": \"$did_yui\",
|
||||||
|
\"collection\": \"$col\",
|
||||||
|
\"rkey\": \"$rkey\",
|
||||||
|
\"record\": {
|
||||||
|
\"did\": \"$did\",
|
||||||
|
\"limit\": false,
|
||||||
|
\"login\": false,
|
||||||
|
\"handle\": \"$handle\",
|
||||||
|
\"aiten\": 10,
|
||||||
|
\"gender\": \"famale\",
|
||||||
|
\"character\": {
|
||||||
|
$json
|
||||||
|
},
|
||||||
|
\"createdAt\": \"${created}\",
|
||||||
|
\"updatedAt\": \"${created}\"
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
|
||||||
|
|
||||||
|
if echo $json|jq . ;then
|
||||||
|
echo $token_yui
|
||||||
|
curl -sL -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $token_yui" -d $json $url
|
||||||
|
fi
|
||||||
|
|
||||||
|
col=ai.syui.game
|
||||||
|
rkey=self
|
||||||
|
at_uri=at://did:plc:4hqjfn7m6n5hno3doamuhgef/ai.syui.game.user/ai
|
||||||
|
|
||||||
|
json="
|
||||||
|
{
|
||||||
|
\"repo\": \"$handle_yui\",
|
||||||
|
\"did\": \"$did_yui\",
|
||||||
|
\"collection\": \"$col\",
|
||||||
|
\"rkey\": \"$rkey\",
|
||||||
|
\"record\": {
|
||||||
|
\"account\": \"$at_uri\",
|
||||||
|
\"username\": \"ai\",
|
||||||
|
\"createdAt\": \"$created\"
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
|
||||||
|
if echo $json|jq . ;then
|
||||||
|
# curl -sL -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $token_yui" -d $json $url
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
#download_character_icon
|
||||||
|
#create_game_character
|
||||||
|
ai_create_user
|
||||||
|
40
ue.json
40
ue.json
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"aiue": {
|
"aiue": {
|
||||||
"name": "aiue",
|
"name": "aiue",
|
||||||
|
"description": "aiue system",
|
||||||
"repo": "https://git.syui.ai/ai/ue",
|
"repo": "https://git.syui.ai/ai/ue",
|
||||||
"body": {
|
"body": {
|
||||||
"text": "[ai] [u]nreal [e]ngine, system overview, game naming conventions",
|
"text": "[ai] [u]nreal [e]ngine, system overview, game naming conventions",
|
||||||
@ -9,8 +10,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lexicon": {
|
"lexicon": {
|
||||||
|
"ai.syui.game": {
|
||||||
|
"uri": "https://git.syui.ai/ai/ue/src/branch/main/lexicons/ai/syui/game.json"
|
||||||
|
},
|
||||||
"ai.syui.game.user": {
|
"ai.syui.game.user": {
|
||||||
"uri": "https://git.syui.ai/ai/ue/src/branch/main/lexicons/ai/syui/game/user.json"
|
"uri": "https://git.syui.ai/ai/ue/src/branch/main/lexicons/ai/syui/game/user.json"
|
||||||
|
},
|
||||||
|
"ai.syui.game.character": {
|
||||||
|
"uri": "https://git.syui.ai/ai/ue/src/branch/main/lexicons/ai/syui/game/character.json"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"system": {
|
"system": {
|
||||||
@ -590,6 +597,7 @@
|
|||||||
"ja": "年齢や出身は不明。ドラゴンより長く生きているという描写がある。自らをアイと名乗る。政府のシステムには[月見唯(つきみゆい)]で登録されている。誕生日は01/23、身長も同じ。月の質量が由来。黒髪、黒い瞳をしている。パイナップルが好物でキノコが苦手"
|
"ja": "年齢や出身は不明。ドラゴンより長く生きているという描写がある。自らをアイと名乗る。政府のシステムには[月見唯(つきみゆい)]で登録されている。誕生日は01/23、身長も同じ。月の質量が由来。黒髪、黒い瞳をしている。パイナップルが好物でキノコが苦手"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"img": "bafkreie34pjuc6coenzcdwrgrh4fbacq7bkhsz263g5vpbsqxwaz37kkwy",
|
||||||
"season": 0,
|
"season": 0,
|
||||||
"group": "origin",
|
"group": "origin",
|
||||||
"attribute": "ai",
|
"attribute": "ai",
|
||||||
@ -599,7 +607,8 @@
|
|||||||
"lang": {
|
"lang": {
|
||||||
"ja": "マニー"
|
"ja": "マニー"
|
||||||
},
|
},
|
||||||
"season": 0,
|
"img": "bafkreie34pjuc6coenzcdwrgrh4fbacq7bkhsz263g5vpbsqxwaz37kkwy",
|
||||||
|
"season": 1,
|
||||||
"group": "test",
|
"group": "test",
|
||||||
"attribute": "test"
|
"attribute": "test"
|
||||||
},
|
},
|
||||||
@ -607,7 +616,8 @@
|
|||||||
"lang": {
|
"lang": {
|
||||||
"ja": "クイーン"
|
"ja": "クイーン"
|
||||||
},
|
},
|
||||||
"season": 0,
|
"img": "bafkreie34pjuc6coenzcdwrgrh4fbacq7bkhsz263g5vpbsqxwaz37kkwy",
|
||||||
|
"season": 1,
|
||||||
"group": "test",
|
"group": "test",
|
||||||
"attribute": "test"
|
"attribute": "test"
|
||||||
},
|
},
|
||||||
@ -615,6 +625,7 @@
|
|||||||
"lang": {
|
"lang": {
|
||||||
"ja": "シンリュウ"
|
"ja": "シンリュウ"
|
||||||
},
|
},
|
||||||
|
"img": "bafkreidlealfybajqzwv5eoz4jshnsijc2vnktlhpw4ph47krwj6aigqby",
|
||||||
"season": 1,
|
"season": 1,
|
||||||
"group": "fantasy",
|
"group": "fantasy",
|
||||||
"attribute": "quark"
|
"attribute": "quark"
|
||||||
@ -623,6 +634,7 @@
|
|||||||
"lang": {
|
"lang": {
|
||||||
"ja": "フェニックス"
|
"ja": "フェニックス"
|
||||||
},
|
},
|
||||||
|
"img": "bafkreich7fsumke2yvumvixkruonzrcevk3f6g2cntzfwdn4n2c2vox5dm",
|
||||||
"season": 1,
|
"season": 1,
|
||||||
"group": "fantasy",
|
"group": "fantasy",
|
||||||
"attribute": "proton"
|
"attribute": "proton"
|
||||||
@ -631,6 +643,7 @@
|
|||||||
"lang": {
|
"lang": {
|
||||||
"ja": "キリン"
|
"ja": "キリン"
|
||||||
},
|
},
|
||||||
|
"img": "bafkreiegpqedlrfa4ljhssdnkrr5hyd5huy2xhh2zszj5wq2wuuzejggmq",
|
||||||
"season": 1,
|
"season": 1,
|
||||||
"group": "fantasy",
|
"group": "fantasy",
|
||||||
"attribute": "neutron"
|
"attribute": "neutron"
|
||||||
@ -639,6 +652,7 @@
|
|||||||
"lang": {
|
"lang": {
|
||||||
"ja": "リヴァイアサン"
|
"ja": "リヴァイアサン"
|
||||||
},
|
},
|
||||||
|
"img": "bafkreig6vszkx3c4dcortjwfsz6sa6zwqgj7zpxj4lxfrrkwql4xhiu5ou",
|
||||||
"season": 1,
|
"season": 1,
|
||||||
"group": "fantasy",
|
"group": "fantasy",
|
||||||
"attribute": "electron"
|
"attribute": "electron"
|
||||||
@ -647,6 +661,7 @@
|
|||||||
"lang": {
|
"lang": {
|
||||||
"ja": "ワイバーン"
|
"ja": "ワイバーン"
|
||||||
},
|
},
|
||||||
|
"img": "bafkreiacjvagsekhiiljz3j237b6klrt6pkptxljt7kltprgg5276gv25q",
|
||||||
"season": 1,
|
"season": 1,
|
||||||
"group": "fantasy",
|
"group": "fantasy",
|
||||||
"attribute": "proton"
|
"attribute": "proton"
|
||||||
@ -655,6 +670,7 @@
|
|||||||
"lang": {
|
"lang": {
|
||||||
"ja": "ケルベロス"
|
"ja": "ケルベロス"
|
||||||
},
|
},
|
||||||
|
"img": "bafkreihpni4lp55jysalcntulzal5rbhidtbseanlucpyucagzxmv6xj24",
|
||||||
"season": 1,
|
"season": 1,
|
||||||
"group": "fantasy",
|
"group": "fantasy",
|
||||||
"attribute": "atomic"
|
"attribute": "atomic"
|
||||||
@ -663,14 +679,16 @@
|
|||||||
"lang": {
|
"lang": {
|
||||||
"ja": "ドラゴン"
|
"ja": "ドラゴン"
|
||||||
},
|
},
|
||||||
|
"img": "bafkreia3huw2gdenqatoobx3hcft74chced46bw4znfgepo5aenegobkri",
|
||||||
"season": 1,
|
"season": 1,
|
||||||
"group": "fantasy",
|
"group": "fantasy",
|
||||||
"attribute": "atomic"
|
"attribute": "atomic"
|
||||||
},
|
},
|
||||||
"kitsune": {
|
"kitsune": {
|
||||||
"lang": {
|
"lang": {
|
||||||
"ja": "ヨウコ"
|
"ja": "キュウビ"
|
||||||
},
|
},
|
||||||
|
"img": "bafkreidy74aieb6ie646xhosginox5zbnbnrtd76cnt4pbn73hrxgfnple",
|
||||||
"season": 1,
|
"season": 1,
|
||||||
"group": "fantasy",
|
"group": "fantasy",
|
||||||
"attribute": "neutron"
|
"attribute": "neutron"
|
||||||
@ -679,6 +697,7 @@
|
|||||||
"lang": {
|
"lang": {
|
||||||
"ja": "ペガサス"
|
"ja": "ペガサス"
|
||||||
},
|
},
|
||||||
|
"img": "bafkreifnbfj27fr6nv7qeqqmwdibf7qrw4lauvzoknw5hexbifmwqt6kmq",
|
||||||
"season": 1,
|
"season": 1,
|
||||||
"group": "fantasy",
|
"group": "fantasy",
|
||||||
"attribute": "electron"
|
"attribute": "electron"
|
||||||
@ -724,5 +743,20 @@
|
|||||||
"attribute": "water"
|
"attribute": "water"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"aiverse": {
|
||||||
|
"name": "aiverse",
|
||||||
|
"description": "aiverse project",
|
||||||
|
"repo": "https://git.syui.ai/ai/ue/src/branch/main/verse",
|
||||||
|
"body": {
|
||||||
|
"text": "ideas and philosophies when building a system. aiming to fuse games and reality",
|
||||||
|
"lang": {
|
||||||
|
"ja": "システムを構築する際の思想と哲学。ゲームと現実の融合を目指す"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"enum": [
|
||||||
|
"game",
|
||||||
|
"real"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user