diff --git a/item/card/0.png b/item/card/0.png new file mode 100644 index 0000000..aca1696 Binary files /dev/null and b/item/card/0.png differ diff --git a/item/card/0.webp b/item/card/0.webp new file mode 100644 index 0000000..08a41bc Binary files /dev/null and b/item/card/0.webp differ diff --git a/item/card/1.png b/item/card/1.png new file mode 100644 index 0000000..047e505 Binary files /dev/null and b/item/card/1.png differ diff --git a/item/card/1.webp b/item/card/1.webp new file mode 100644 index 0000000..eb0ea6d Binary files /dev/null and b/item/card/1.webp differ diff --git a/item/card/10.png b/item/card/10.png new file mode 100644 index 0000000..e3731fa Binary files /dev/null and b/item/card/10.png differ diff --git a/item/card/10.webp b/item/card/10.webp new file mode 100644 index 0000000..ee5956f Binary files /dev/null and b/item/card/10.webp differ diff --git a/item/card/11.png b/item/card/11.png new file mode 100644 index 0000000..d34522b Binary files /dev/null and b/item/card/11.png differ diff --git a/item/card/11.webp b/item/card/11.webp new file mode 100644 index 0000000..233dd2d Binary files /dev/null and b/item/card/11.webp differ diff --git a/item/card/12.png b/item/card/12.png new file mode 100644 index 0000000..e048e23 Binary files /dev/null and b/item/card/12.png differ diff --git a/item/card/12.webp b/item/card/12.webp new file mode 100644 index 0000000..6a3c2d4 Binary files /dev/null and b/item/card/12.webp differ diff --git a/item/card/13.png b/item/card/13.png new file mode 100644 index 0000000..97b061f Binary files /dev/null and b/item/card/13.png differ diff --git a/item/card/13.webp b/item/card/13.webp new file mode 100644 index 0000000..8849df8 Binary files /dev/null and b/item/card/13.webp differ diff --git a/item/card/135.png b/item/card/135.png new file mode 100644 index 0000000..f30f7d6 Binary files /dev/null and b/item/card/135.png differ diff --git a/item/card/135.webp b/item/card/135.webp new file mode 100644 index 0000000..bc57704 Binary files /dev/null and b/item/card/135.webp differ diff --git a/item/card/136.mp4 b/item/card/136.mp4 new file mode 100644 index 0000000..41a1d84 Binary files /dev/null and b/item/card/136.mp4 differ diff --git a/item/card/136.png b/item/card/136.png new file mode 100644 index 0000000..f26c89a Binary files /dev/null and b/item/card/136.png differ diff --git a/item/card/136.webp b/item/card/136.webp new file mode 100644 index 0000000..54f95bf Binary files /dev/null and b/item/card/136.webp differ diff --git a/item/card/14.png b/item/card/14.png new file mode 100644 index 0000000..40fb878 Binary files /dev/null and b/item/card/14.png differ diff --git a/item/card/14.webp b/item/card/14.webp new file mode 100644 index 0000000..2765f33 Binary files /dev/null and b/item/card/14.webp differ diff --git a/item/card/2.png b/item/card/2.png new file mode 100644 index 0000000..8f93449 Binary files /dev/null and b/item/card/2.png differ diff --git a/item/card/2.webp b/item/card/2.webp new file mode 100644 index 0000000..490139b Binary files /dev/null and b/item/card/2.webp differ diff --git a/item/card/3.png b/item/card/3.png new file mode 100644 index 0000000..c7a7b70 Binary files /dev/null and b/item/card/3.png differ diff --git a/item/card/3.webp b/item/card/3.webp new file mode 100644 index 0000000..31b3eb5 Binary files /dev/null and b/item/card/3.webp differ diff --git a/item/card/4.png b/item/card/4.png new file mode 100644 index 0000000..bdda575 Binary files /dev/null and b/item/card/4.png differ diff --git a/item/card/4.webp b/item/card/4.webp new file mode 100644 index 0000000..12ae626 Binary files /dev/null and b/item/card/4.webp differ diff --git a/item/card/5.png b/item/card/5.png new file mode 100644 index 0000000..77d8de2 Binary files /dev/null and b/item/card/5.png differ diff --git a/item/card/5.webp b/item/card/5.webp new file mode 100644 index 0000000..c9b2939 Binary files /dev/null and b/item/card/5.webp differ diff --git a/item/card/6.png b/item/card/6.png new file mode 100644 index 0000000..c9dfc6b Binary files /dev/null and b/item/card/6.png differ diff --git a/item/card/6.webp b/item/card/6.webp new file mode 100644 index 0000000..c01dd20 Binary files /dev/null and b/item/card/6.webp differ diff --git a/item/card/7.png b/item/card/7.png new file mode 100644 index 0000000..613cb12 Binary files /dev/null and b/item/card/7.png differ diff --git a/item/card/7.webp b/item/card/7.webp new file mode 100644 index 0000000..f266828 Binary files /dev/null and b/item/card/7.webp differ diff --git a/item/card/8.png b/item/card/8.png new file mode 100644 index 0000000..908ae01 Binary files /dev/null and b/item/card/8.png differ diff --git a/item/card/8.webp b/item/card/8.webp new file mode 100644 index 0000000..f552fa7 Binary files /dev/null and b/item/card/8.webp differ diff --git a/item/card/9.png b/item/card/9.png new file mode 100644 index 0000000..b315338 Binary files /dev/null and b/item/card/9.png differ diff --git a/item/card/9.webp b/item/card/9.webp new file mode 100644 index 0000000..6744937 Binary files /dev/null and b/item/card/9.webp differ diff --git a/item/card/readme.md b/item/card/readme.md new file mode 100644 index 0000000..da2aba3 --- /dev/null +++ b/item/card/readme.md @@ -0,0 +1,38 @@ +# card + +カードの仕様を決定します。 + +基本的に`3:4`の`1620x2160`で生成していましたが、`4:5`の`1080x1350`で生成することにしました。これはwindows動画編集が4:5にしか対応していないからです。`.mov`から動画編集で`.mp4`に変換し、それを`.webp`にします。 + +comfyuiの動画生成はカードの大きさではなかなか思うような動画が作れませんでした。やはり`1920x1080(1080p)`からの生成が最適でした。 + +- [16:9] 1920x1080 (1080p) +- [16:9] 1280×720 (720p) +- [16:9] 854x480 (480p) +- [4:3] 2160x1620 +- [4:3] 1440x1080 +- [4:3] 1024×768 +- [4:3] 640×480 +- [4:5] 2025x1620 +- [4:5] 1536x2048 +- [4:5] 1080x1350 + +```bash +$ magick convert -resize 480x -quality 100 4.png 4.webp +$ magick convert -quality 100 1.png 1.webp + +$ magick convert -size 1620x2160 xc:white 1080p.png +$ magick convert -resize 1080x -quality 100 1.png 1.webp +``` + +```sh +$ ffmpeg -i 4.mp4 -vf "fps=15,setpts=PTS/4" -c:v libwebp -loop 1 -quality 100 4.webp +``` + +## list + + + + + + diff --git a/scpt/at.zsh b/scpt/at.zsh index c10ccd7..0835b39 100755 --- a/scpt/at.zsh +++ b/scpt/at.zsh @@ -4,6 +4,7 @@ d=${0:a:h} source $d/src/tag.zsh source $d/src/func.zsh +source $d/src/ue.zsh source $d/src/ai/syui/game/character.zsh source $d/src/is/syu/main.zsh @@ -63,6 +64,12 @@ case $1 in self-col) self-col $2 ;; + ue-system) + ue-system + ;; + ue-user) + ue-user $2 + ;; *) echo "${help[@]}" echo "${host[@]}" diff --git a/scpt/src/ai/syui/game/character.zsh b/scpt/src/ai/syui/game/character.zsh index 5853f0c..e5acea0 100755 --- a/scpt/src/ai/syui/game/character.zsh +++ b/scpt/src/ai/syui/game/character.zsh @@ -1,33 +1,3 @@ -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(){ t=( diff --git a/scpt/src/tag.zsh b/scpt/src/tag.zsh index c82ea9c..974b0d1 100644 --- a/scpt/src/tag.zsh +++ b/scpt/src/tag.zsh @@ -38,3 +38,33 @@ github=( ) tag=( at bsky bsync pds bgs plc ozone feed jetstream social-app oauth ) #pds_list=(bsky.social syu.is boobee.blue socl.is ) + +character=( + ai + manny + quinn + chinese + kirin + leviathan + phoenix + wyvern + cerberus + dragon + kitsune + pegasus +) + +character_img=( + bafkreie34pjuc6coenzcdwrgrh4fbacq7bkhsz263g5vpbsqxwaz37kkwy + bafkreie34pjuc6coenzcdwrgrh4fbacq7bkhsz263g5vpbsqxwaz37kkwy + bafkreie34pjuc6coenzcdwrgrh4fbacq7bkhsz263g5vpbsqxwaz37kkwy + bafkreidlealfybajqzwv5eoz4jshnsijc2vnktlhpw4ph47krwj6aigqby + bafkreiegpqedlrfa4ljhssdnkrr5hyd5huy2xhh2zszj5wq2wuuzejggmq + bafkreig6vszkx3c4dcortjwfsz6sa6zwqgj7zpxj4lxfrrkwql4xhiu5ou + bafkreich7fsumke2yvumvixkruonzrcevk3f6g2cntzfwdn4n2c2vox5dm + bafkreiacjvagsekhiiljz3j237b6klrt6pkptxljt7kltprgg5276gv25q + bafkreihpni4lp55jysalcntulzal5rbhidtbseanlucpyucagzxmv6xj24 + bafkreia3huw2gdenqatoobx3hcft74chced46bw4znfgepo5aenegobkri + bafkreidy74aieb6ie646xhosginox5zbnbnrtd76cnt4pbn73hrxgfnple + bafkreifnbfj27fr6nv7qeqqmwdibf7qrw4lauvzoknw5hexbifmwqt6kmq +) diff --git a/scpt/src/ue.zsh b/scpt/src/ue.zsh new file mode 100755 index 0000000..1c29e27 --- /dev/null +++ b/scpt/src/ue.zsh @@ -0,0 +1,193 @@ +case $OSTYPE in + darwin*) + day=`gdate --iso-8601=seconds` + ;; + *) + day=`date --iso-8601=seconds` + ;; +esac + +function get_game_user() { + rkey=$did.$pds + pds=bsky.social + if [ "$1" = "syui" ] || [ "$1" = "ai" ];then + rkey=$1 + fi + req=com.atproto.repo.getRecord + url="https://$pds/xrpc/$req?rkey=$rkey&repo=$did_yui&collection=ai.syui.game" + curl -sL $url|jq . +} + +function delete_game_user() { + rkey=$2 + if [ -z "$1" ];then + col=ai.syui.game + else + col=$1 + fi + 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 +} + +function ue-user() { + col=ai.syui.game + rkey=$1 + 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 + fi + version=4 + #rkey=syui + req=com.atproto.repo.putRecord + url=https://$pds/xrpc/$req + + cname=dragon + + if [ "$rkey" = "ai" ];then + cname=$rkey + gender=none + fi + if [ "$rkey" = "syui" ];then + cname=chinese + did=$did_syui + handle=syui.ai + gender=male + fi + if [ "$rkey" = "self" ];then + cname=manny + unset did handle gender + pds=bsky.social + plc=plc.directory + fi + season=1 + group=test + lv=1 + hp=1 + exp=0 + rare=0 + mode=0 + attack=0 + attack_post=0 + critical=0 + critical_d=0 + card=0 + weapon=0 + coin=0 + count=0 + + case $cname in + ai) + group=origin + season=0 + mode=2 + ;; + manny|quinn) + group=test + ;; + *) + group=fantasy + ;; + esac + +json_item=" +\"coin\": [{\"id\": 0, \"cp\": 0, \"rare\": 0, \"count\": 0}], +\"card\": [{\"id\": 0, \"cp\": 0, \"rare\": 0, \"count\": 0}], +\"weapon\": [{\"id\": 0, \"cp\": 0, \"rare\": 0, \"count\": 0}] +" + + json=" + { + \"repo\": \"$handle_yui\", + \"did\": \"$did_yui\", + \"collection\": \"$col\", + \"rkey\": \"$rkey\", + \"record\": { + \"version\": $version, + \"did\": \"$did\", + \"handle\": \"$handle\", + \"plc\": \"$plc\", + \"pds\": \"$pds\", + \"player\": { + \"limit\": false, + \"login\": false, + \"ten\": 0, + \"gender\": \"$gender\" + }, + \"character\": { + $json + }, + \"item\": { + $json_item + }, + \"createdAt\": \"${created}\", + \"updatedAt\": \"${created}\" + } +}" + +if echo $json|jq . ;then + echo y + 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 . + #f=~/ai/ue/json/v${version}_${rkey}.json + #if [ -f $f ];then + # get_game_user $rkey >! $f + #fi + fi +fi +} + +function ue-system() { + col=ai.syui.system + rkey=self + did=$did + handle=$handle + pds=`cat $f|jq -r ".didDoc.service.[].serviceEndpoint"|cut -d / -f 3` + if [ "$pds" != "syu.is" ];then + pds=bsky.social + fi + version=1 + #rkey=syui + req=com.atproto.repo.putRecord + url=https://$pds/xrpc/$req + 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/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\", + \"did\": \"$did\", + \"collection\": \"$col\", + \"rkey\": \"$rkey\", + \"record\": { + \"card\": ${json_card}, + \"weapon\": ${json_weapon}, + \"system\": ${json_system}, + \"character\": ${json_character}, + \"ability\": ${json_ability}, + \"createdAt\": \"${created}\", + \"updatedAt\": \"${created}\" + } +}" + +if echo $json|jq . ;then + echo y + 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 . + fi +fi +}