1
0
This commit is contained in:
syui 2024-02-16 16:16:22 +09:00
parent b60c1c3d0d
commit 217fe6c1ed
Signed by: syui
GPG Key ID: 5417CFEBAD92DF56
23 changed files with 113 additions and 79 deletions

14
Makefile.toml Normal file
View File

@ -0,0 +1,14 @@
[tasks.BUILD]
description = "Build hoge"
script = ['''
#!/usr/bin/env bash
echo "build ${@}..."
''']
[tasks.TEST]
description = "Test hoge"
script = ['''
#!/usr/bin/env python3
print("test ...")
''']
dependencies = ["BUILD"]

View File

@ -1,8 +1,8 @@
#!/bin/zsh #!/bin/zsh
# raid-boss-admin # raid-boss-admin
cfg=$HOME/.config/atr/scpt/card_config.json cfg=$HOME/.config/ai/scpt/card_config.json
cfg_ai=$HOME/.config/atr/scpt/card_config_ai.json cfg_ai=$HOME/.config/ai/scpt/card_config_ai.json
# { # {
# "raid_admin":"yui.bsky.social", # "raid_admin":"yui.bsky.social",
# "raid_time": "", # "raid_time": "",
@ -16,7 +16,7 @@ case $OSTYPE in
esac esac
# 1=handle, 2=did, 3=opt, 4=sub # 1=handle, 2=did, 3=opt, 4=sub
fav_com=$HOME/.config/atr/scpt/api_fav.zsh fav_com=$HOME/.config/ai/scpt/api_fav.zsh
function user_data(){ function user_data(){
u=`echo $data|jq -r .username` u=`echo $data|jq -r .username`
@ -348,9 +348,9 @@ function user_card(){
} }
function battle_raid(){ function battle_raid(){
f_raid_user=$HOME/.config/atr/txt/card_raid_user.txt f_raid_user=$HOME/.config/ai/txt/card_raid_user.txt
f_raid_start_cp=$HOME/.config/atr/txt/card_raid_start_cp.txt f_raid_start_cp=$HOME/.config/ai/txt/card_raid_start_cp.txt
f_raid_start_time=$HOME/.config/atr/txt/card_raid_start_time.txt f_raid_start_time=$HOME/.config/ai/txt/card_raid_start_time.txt
boss_cp=150000 boss_cp=150000
if [ `date +%u` -ge 6 ];then if [ `date +%u` -ge 6 ];then
@ -658,16 +658,16 @@ function battle_server(){
rr=`date +"%H%M"` rr=`date +"%H%M"`
a_team=bluesky a_team=bluesky
b_team=mastodon b_team=mastodon
f_server_prezent=$HOME/.config/atr/txt/card_server_prezent.txt f_server_prezent=$HOME/.config/ai/txt/card_server_prezent.txt
f_server=$HOME/.config/atr/txt/card_server.txt f_server=$HOME/.config/ai/txt/card_server.txt
f_server_user_at=$HOME/.config/atr/txt/card_server_user_at.txt f_server_user_at=$HOME/.config/ai/txt/card_server_user_at.txt
f_server_user_ap=$HOME/.config/atr/txt/card_server_user_ap.txt f_server_user_ap=$HOME/.config/ai/txt/card_server_user_ap.txt
f_server_ap=$HOME/.config/atr/txt/card_server_ap.txt f_server_ap=$HOME/.config/ai/txt/card_server_ap.txt
f_server_at=$HOME/.config/atr/txt/card_server_at.txt f_server_at=$HOME/.config/ai/txt/card_server_at.txt
f_server_start_time=$HOME/.config/atr/txt/card_server_start_time.txt f_server_start_time=$HOME/.config/ai/txt/card_server_start_time.txt
at_endpoint=`curl -sL https://plc.directory/$did|jq -r ".service.[].serviceEndpoint"|cut -d . -f 1-2|cut -d / -f 3` at_endpoint=`curl -sL https://plc.directory/$did|jq -r ".service.[].serviceEndpoint"|cut -d . -f 1-2|cut -d / -f 3`
at_endpoint_f=$HOME/.config/atr/txt/at_endpoint_${at_endpoint}_.txt at_endpoint_f=$HOME/.config/ai/txt/at_endpoint_${at_endpoint}_.txt
touch $at_endpoint_f touch $at_endpoint_f
a_team=$at_endpoint a_team=$at_endpoint
f_server_at=$at_endpoint_f f_server_at=$at_endpoint_f
@ -780,7 +780,7 @@ function battle_server(){
#echo "┗ @${commit_user_ap}" #echo "┗ @${commit_user_ap}"
#echo "----" #echo "----"
#mastodon #mastodon
at_end_t=`ls $HOME/.config/atr/txt/at_endpoint_*.txt` at_end_t=`ls $HOME/.config/ai/txt/at_endpoint_*.txt`
at_end_n=`echo "$at_end_t"|wc -l` at_end_n=`echo "$at_end_t"|wc -l`
for ((ati=1;ati<=$at_end_n;ati++)) for ((ati=1;ati<=$at_end_n;ati++))
do do
@ -871,7 +871,7 @@ function l_cards() {
} }
url=https://api.syui.ai url=https://api.syui.ai
cfg=$HOME/.config/atr/scpt/card_config.json cfg=$HOME/.config/ai/scpt/card_config.json
if [ -f $cfg ];then if [ -f $cfg ];then
raid_run=`cat $cfg|jq -r .raid_run` raid_run=`cat $cfg|jq -r .raid_run`
raid_boss_admin=`cat $cfg|jq -r .raid_admin` raid_boss_admin=`cat $cfg|jq -r .raid_admin`
@ -881,16 +881,16 @@ if [ -f $cfg ];then
raid_sp_card=`cat $cfg|jq -r .raid_card` raid_sp_card=`cat $cfg|jq -r .raid_card`
fi fi
f_raid=$HOME/.config/atr/txt/card_raid.txt f_raid=$HOME/.config/ai/txt/card_raid.txt
raid_cp=`cat $f_raid` raid_cp=`cat $f_raid`
d=`date +"%Y%m%d"` d=`date +"%Y%m%d"`
nd=`date +"%Y%m%d" -d '1 day'` nd=`date +"%Y%m%d" -d '1 day'`
username=`echo $1|cut -d . -f 1` username=`echo $1|cut -d . -f 1`
handle=$1 handle=$1
url_user_all="$url/users?itemsPerPage=2000" url_user_all="$url/users?itemsPerPage=2000"
f=$HOME/.config/atr/scpt/t.webp f=$HOME/.config/ai/scpt/t.webp
pass=`cat $HOME/.config/atr/api_card.json|jq -r .password` pass=`cat $HOME/.config/ai/api_card.json|jq -r .password`
token=`cat $HOME/.config/atr/api_card.json|jq -r .token` token=`cat $HOME/.config/ai/api_card.json|jq -r .token`
if [ -z "$1" ];then if [ -z "$1" ];then
exit exit
fi fi
@ -999,7 +999,7 @@ server_at_n=`date --iso-8601=seconds`
day_m=`date +"%H%M"` day_m=`date +"%H%M"`
day_mm=`date +"%H%M" -d "-1 min"` day_mm=`date +"%H%M" -d "-1 min"`
day_mmm=`date +"%H%M" -d "-2 min"` day_mmm=`date +"%H%M" -d "-2 min"`
f_raid=$HOME/.config/atr/txt/card_raid.txt f_raid=$HOME/.config/ai/txt/card_raid.txt
# luck # luck
luck=`echo $data|jq -r .luck` luck=`echo $data|jq -r .luck`
@ -1072,7 +1072,7 @@ if [ "atp" = "`echo $3|cut -d = -f 1`" ];then
fi fi
if [ "server_battle_mode" = "$3" ];then if [ "server_battle_mode" = "$3" ];then
f_server_prezent=$HOME/.config/atr/txt/card_server_prezent.txt f_server_prezent=$HOME/.config/ai/txt/card_server_prezent.txt
if [ "syui.ai" != "$1" ];then if [ "syui.ai" != "$1" ];then
no admin no admin
exit exit

View File

@ -1,9 +1,9 @@
#!/bin/zsh #!/bin/zsh
url=https://api.syui.ai url=https://api.syui.ai
token=`cat $HOME/.config/atr/api_card.json|jq -r .token` token=`cat $HOME/.config/ai/api_card.json|jq -r .token`
pass=`cat $HOME/.config/atr/api_card.json|jq -r .password` pass=`cat $HOME/.config/ai/api_card.json|jq -r .password`
f_reid_user=$HOME/.config/atr/txt/card_reid_user.txt f_reid_user=$HOME/.config/ai/txt/card_reid_user.txt
n=`cat $f_reid_user|wc -l` n=`cat $f_reid_user|wc -l`
for ((i=1;i<=$n;i++)) for ((i=1;i<=$n;i++))

View File

@ -66,8 +66,8 @@ host_card=https://card.syui.ai/json/card.json
ran=$(($RANDOM % 3)) ran=$(($RANDOM % 3))
pass=`cat $HOME/.config/atr/api_card.json|jq -r .password` pass=`cat $HOME/.config/ai/api_card.json|jq -r .password`
token=`cat $HOME/.config/atr/api_card.json|jq -r .token` token=`cat $HOME/.config/ai/api_card.json|jq -r .token`
handle=$1 handle=$1
did=$2 did=$2

View File

@ -9,8 +9,8 @@ esac
atr=$HOME/.cargo/bin/atr atr=$HOME/.cargo/bin/atr
host=https://api.syui.ai host=https://api.syui.ai
pass=`cat $HOME/.config/atr/api_card.json|jq -r .password` pass=`cat $HOME/.config/ai/api_card.json|jq -r .password`
token=`cat $HOME/.config/atr/api_card.json|jq -r .token` token=`cat $HOME/.config/ai/api_card.json|jq -r .token`
egg_card=40 egg_card=40

View File

@ -9,8 +9,8 @@ esac
atr=$HOME/.cargo/bin/atr atr=$HOME/.cargo/bin/atr
host=https://api.syui.ai host=https://api.syui.ai
pass=`cat $HOME/.config/atr/api_card.json|jq -r .password` pass=`cat $HOME/.config/ai/api_card.json|jq -r .password`
token=`cat $HOME/.config/atr/api_card.json|jq -r .token` token=`cat $HOME/.config/ai/api_card.json|jq -r .token`
handle=$1 handle=$1
did=$2 did=$2

View File

@ -22,17 +22,17 @@ if [ -z "$5" ];then
exit exit
fi fi
card_pay=$HOME/.config/atr/scpt/card_pay.zsh card_pay=$HOME/.config/ai/scpt/card_pay.zsh
atr=$HOME/.cargo/bin/atr atr=$HOME/.cargo/bin/atr
host=https://api.syui.ai host=https://api.syui.ai
host_card=https://card.syui.ai/json/card.json host_card=https://card.syui.ai/json/card.json
host_card_json=`curl -sL $host_card` host_card_json=`curl -sL $host_card`
n_cid=$HOME/.config/atr/txt/tmp_notify_cid.txt n_cid=$HOME/.config/ai/txt/tmp_notify_cid.txt
f_cfg=$HOME/.config/atr/txt/tmp_ten_config.txt f_cfg=$HOME/.config/ai/txt/tmp_ten_config.txt
function moon_check(){ function moon_check(){
moon_now=`date +"%Y%m%d"` moon_now=`date +"%Y%m%d"`
moon_j=$HOME/.config/atr/scpt/full_moon.j moon_j=$HOME/.config/ai/scpt/full_moon.j
if [ -f $moon_j ];then if [ -f $moon_j ];then
moon_t=`cat $moon_j|jq ".[]|select(.data == \"$moon_now\")"` moon_t=`cat $moon_j|jq ".[]|select(.data == \"$moon_now\")"`
if [ -n "$moon_t" ];then if [ -n "$moon_t" ];then
@ -59,8 +59,8 @@ ran_z=$(($RANDOM % 540))
ran_cm=$(($RANDOM % 3)) ran_cm=$(($RANDOM % 3))
ran_first=$(($RANDOM % 6)) ran_first=$(($RANDOM % 6))
pass=`cat $HOME/.config/atr/api_card.json|jq -r .password` pass=`cat $HOME/.config/ai/api_card.json|jq -r .password`
token=`cat $HOME/.config/atr/api_card.json|jq -r .token` token=`cat $HOME/.config/ai/api_card.json|jq -r .token`
handle=$1 handle=$1
did=$2 did=$2

View File

@ -6,13 +6,13 @@ case $OSTYPE in
;; ;;
esac esac
card_pay=$HOME/.config/atr/scpt/card_pay.zsh card_pay=$HOME/.config/ai/scpt/card_pay.zsh
atr=$HOME/.cargo/bin/atr atr=$HOME/.cargo/bin/atr
host=https://api.syui.ai host=https://api.syui.ai
host_card=https://card.syui.ai/json/card.json host_card=https://card.syui.ai/json/card.json
host_card_json=`curl -sL $host_card` host_card_json=`curl -sL $host_card`
n_cid=$HOME/.config/atr/txt/tmp_notify_cid.txt n_cid=$HOME/.config/ai/txt/tmp_notify_cid.txt
f_cfg=$HOME/.config/atr/txt/tmp_ten_config.txt f_cfg=$HOME/.config/ai/txt/tmp_ten_config.txt
handle=$1 handle=$1
did=$2 did=$2
username=`echo $1|cut -d . -f 1` username=`echo $1|cut -d . -f 1`
@ -27,8 +27,8 @@ if [ -f $f_cfg ];then
nn=`cat $f_cfg|wc -c` nn=`cat $f_cfg|wc -c`
fi fi
pass=`cat $HOME/.config/atr/api_card.json|jq -r .password` pass=`cat $HOME/.config/ai/api_card.json|jq -r .password`
token=`cat $HOME/.config/atr/api_card.json|jq -r .token` token=`cat $HOME/.config/ai/api_card.json|jq -r .token`
function ten_yak() { function ten_yak() {
unset ran_a unset ran_a

View File

@ -1,8 +1,8 @@
#!/bin/zsh #!/bin/zsh
dir=${0:a:h} dir=${0:a:h}
f=$HOME/.config/atr/scpt/png/t.png f=$HOME/.config/ai/scpt/png/t.png
f_sleep=$HOME/.config/atr/scpt/png/sleep f_sleep=$HOME/.config/ai/scpt/png/sleep
cid=$1 cid=$1
uri=$2 uri=$2

View File

@ -2,11 +2,11 @@
host_at=bsky.social host_at=bsky.social
url_at=https://$host_at/xrpc/com.atproto.repo.listRecords url_at=https://$host_at/xrpc/com.atproto.repo.listRecords
scpt=$HOME/.config/atr/scpt/api_card.zsh scpt=$HOME/.config/ai/scpt/api_card.zsh
handle=skychan.social handle=skychan.social
did=did:plc:7hgow77uky7lgbinwyvbzhar did=did:plc:7hgow77uky7lgbinwyvbzhar
f=$HOME/.config/atr/card_bot.txt f=$HOME/.config/ai/card_bot.txt
touch $f touch $f
n=5 n=5

View File

@ -1,6 +1,6 @@
#!/bin/zsh #!/bin/zsh
d=$HOME/.config/atr/txt d=$HOME/.config/ai/txt
mkdir -p $d mkdir -p $d
f=$d/kawaii.txt f=$d/kawaii.txt

View File

@ -5,15 +5,15 @@ exit
atr=$HOME/.cargo/bin/atr atr=$HOME/.cargo/bin/atr
url_j=https://card.syui.ai/json/card.json url_j=https://card.syui.ai/json/card.json
tcid=$HOME/.config/atr/txt/tmp_notify_cid.txt tcid=$HOME/.config/ai/txt/tmp_notify_cid.txt
handle=$1 handle=$1
did=$2 did=$2
cid=$3 cid=$3
uri=$4 uri=$4
if [ ! -d $HOME/.config/atr/txt ];then if [ ! -d $HOME/.config/ai/txt ];then
mkdir -p $HOME/.config/atr/txt mkdir -p $HOME/.config/ai/txt
fi fi
case $OSTYPE in case $OSTYPE in

View File

@ -2,15 +2,15 @@
atr=$HOME/.cargo/bin/atr atr=$HOME/.cargo/bin/atr
url_j=https://card.syui.ai/json/card.json url_j=https://card.syui.ai/json/card.json
tcid=$HOME/.config/atr/txt/tmp_notify_cid.txt tcid=$HOME/.config/ai/txt/tmp_notify_cid.txt
handle=$1 handle=$1
did=$2 did=$2
cid=$3 cid=$3
uri=$4 uri=$4
if [ ! -d $HOME/.config/atr/txt ];then if [ ! -d $HOME/.config/ai/txt ];then
mkdir -p $HOME/.config/atr/txt mkdir -p $HOME/.config/ai/txt
fi fi
case $OSTYPE in case $OSTYPE in
@ -150,8 +150,8 @@ if [ "`cat $tcid`" != "$cid" ];then
fi fi
fi fi
pass=`cat $HOME/.config/atr/api_card.json|jq -r .password` pass=`cat $HOME/.config/ai/api_card.json|jq -r .password`
token=`cat $HOME/.config/atr/api_card.json|jq -r .token` token=`cat $HOME/.config/ai/api_card.json|jq -r .token`
if [ $luck -eq 7 ];then if [ $luck -eq 7 ];then
tmp=`curl -X PATCH -H "Content-Type: application/json" -d "{\"luck_at\":\"$luck_at_n\",\"token\":\"$token\",\"luck\": $luck, \"next\": \"$nd\"}" -s $url/users/$uid` tmp=`curl -X PATCH -H "Content-Type: application/json" -d "{\"luck_at\":\"$luck_at_n\",\"token\":\"$token\",\"luck\": $luck, \"next\": \"$nd\"}" -s $url/users/$uid`

View File

@ -2,15 +2,15 @@
atr=$HOME/.cargo/bin/atr atr=$HOME/.cargo/bin/atr
url_j=https://card.syui.ai/json/card.json url_j=https://card.syui.ai/json/card.json
tcid=$HOME/.config/atr/txt/tmp_notify_cid.txt tcid=$HOME/.config/ai/txt/tmp_notify_cid.txt
handle=$1 handle=$1
did=$2 did=$2
cid=$3 cid=$3
uri=$4 uri=$4
if [ ! -d $HOME/.config/atr/txt ];then if [ ! -d $HOME/.config/ai/txt ];then
mkdir -p $HOME/.config/atr/txt mkdir -p $HOME/.config/ai/txt
fi fi
case $OSTYPE in case $OSTYPE in
@ -136,8 +136,8 @@ if [ "`cat $tcid`" != "$cid" ];then
fi fi
fi fi
pass=`cat $HOME/.config/atr/api_card.json|jq -r .password` pass=`cat $HOME/.config/ai/api_card.json|jq -r .password`
token=`cat $HOME/.config/atr/api_card.json|jq -r .token` token=`cat $HOME/.config/ai/api_card.json|jq -r .token`
if [ $luck -eq 7 ];then if [ $luck -eq 7 ];then
tmp=`curl -X PATCH -H "Content-Type: application/json" -d "{\"luck_at\":\"$luck_at_n\",\"token\":\"$token\",\"luck\": $luck, \"next\": \"$nd\"}" -s $url/users/$uid` tmp=`curl -X PATCH -H "Content-Type: application/json" -d "{\"luck_at\":\"$luck_at_n\",\"token\":\"$token\",\"luck\": $luck, \"next\": \"$nd\"}" -s $url/users/$uid`

View File

@ -9,8 +9,8 @@ esac
atr=$HOME/.cargo/bin/atr atr=$HOME/.cargo/bin/atr
host=https://api.syui.ai host=https://api.syui.ai
host_card=https://card.syui.ai/json/card.json host_card=https://card.syui.ai/json/card.json
pass=`cat $HOME/.config/atr/api_card.json|jq -r .password` pass=`cat $HOME/.config/ai/api_card.json|jq -r .password`
token=`cat $HOME/.config/atr/api_card.json|jq -r .token` token=`cat $HOME/.config/ai/api_card.json|jq -r .token`
handle=$1 handle=$1
username=`echo $1|cut -d . -f 1` username=`echo $1|cut -d . -f 1`
did=$2 did=$2

View File

@ -2,15 +2,15 @@
atr=$HOME/.cargo/bin/atr atr=$HOME/.cargo/bin/atr
url_j=https://card.syui.ai/json/card.json url_j=https://card.syui.ai/json/card.json
tcid=$HOME/.config/atr/txt/tmp_notify_cid.txt tcid=$HOME/.config/ai/txt/tmp_notify_cid.txt
handle=$1 handle=$1
did=$2 did=$2
cid=$3 cid=$3
uri=$4 uri=$4
if [ ! -d $HOME/.config/atr/txt ];then if [ ! -d $HOME/.config/ai/txt ];then
mkdir -p $HOME/.config/atr/txt mkdir -p $HOME/.config/ai/txt
fi fi
case $OSTYPE in case $OSTYPE in

View File

@ -1,6 +1,6 @@
#!/bin/zsh #!/bin/zsh
d=$HOME/.config/atr/txt d=$HOME/.config/ai/txt
mkdir -p $d mkdir -p $d
unset cursor unset cursor

View File

@ -1,6 +1,6 @@
#!/bin/zsh #!/bin/zsh
admin_password=`cat $HOME/.config/atr/api_card.json|jq -r .pds_admin_password` admin_password=`cat $HOME/.config/ai/api_card.json|jq -r .pds_admin_password`
if [ -n "$1" ];then if [ -n "$1" ];then
host=$1 host=$1
else else

View File

@ -9,7 +9,7 @@ esac
PATH=$PATH:$HOME/.cargo/bin PATH=$PATH:$HOME/.cargo/bin
d=$HOME/.config/msr d=$HOME/.config/msr
f=$HOME/.config/msr/notify_log.txt f=$HOME/.config/msr/notify_log.txt
card=$HOME/.config/atr/scpt/api_card.zsh card=$HOME/.config/ai/scpt/api_card.zsh
if [ ! -d $d ];then if [ ! -d $d ];then
mkdir -p $d mkdir -p $d
@ -49,8 +49,8 @@ function card_env() {
updated_at_o=`date --iso-8601=seconds -d '-1 day'` updated_at_o=`date --iso-8601=seconds -d '-1 day'`
username=`echo $1|cut -d . -f 1` username=`echo $1|cut -d . -f 1`
url_user_all="$host/users?itemsPerPage=2000" url_user_all="$host/users?itemsPerPage=2000"
pass=`cat $HOME/.config/atr/api_card.json|jq -r .password` pass=`cat $HOME/.config/ai/api_card.json|jq -r .password`
token=`cat $HOME/.config/atr/api_card.json|jq -r .token` token=`cat $HOME/.config/ai/api_card.json|jq -r .token`
data_tmp=`curl -sL $url_user_all` data_tmp=`curl -sL $url_user_all`
data=`echo "$data_tmp"|jq ".[]|select(.username == \"$ap\")"` data=`echo "$data_tmp"|jq ".[]|select(.username == \"$ap\")"`
if [ -z "$data" ];then if [ -z "$data" ];then
@ -212,12 +212,12 @@ function card_s(){
a_team=mastodon a_team=mastodon
b_team=bluesky b_team=bluesky
rr=`date +"%H%M"` rr=`date +"%H%M"`
f_server=$HOME/.config/atr/txt/card_server.txt f_server=$HOME/.config/ai/txt/card_server.txt
f_server_user_at=$HOME/.config/atr/txt/card_server_user_at.txt f_server_user_at=$HOME/.config/ai/txt/card_server_user_at.txt
f_server_user_ap=$HOME/.config/atr/txt/card_server_user_ap.txt f_server_user_ap=$HOME/.config/ai/txt/card_server_user_ap.txt
f_server_ap=$HOME/.config/atr/txt/card_server_ap.txt f_server_ap=$HOME/.config/ai/txt/card_server_ap.txt
f_server_at=$HOME/.config/atr/txt/card_server_at.txt f_server_at=$HOME/.config/ai/txt/card_server_at.txt
f_server_start_time=$HOME/.config/atr/txt/card_server_start_time.txt f_server_start_time=$HOME/.config/ai/txt/card_server_start_time.txt
if [ `cat $f_server` -eq 1 ];then if [ `cat $f_server` -eq 1 ];then
echo shutdown server battle echo shutdown server battle

View File

@ -29,7 +29,7 @@ like_old=`echo $data|jq -r .like`
nolike=$(($RANDOM % 30)) nolike=$(($RANDOM % 30))
like=$(($RANDOM % 10)) like=$(($RANDOM % 10))
like_at=`date --iso-8601=seconds` like_at=`date --iso-8601=seconds`
token=`cat $HOME/.config/atr/api_card.json|jq -r .token` token=`cat $HOME/.config/ai/api_card.json|jq -r .token`
echo nolike $nolike echo nolike $nolike
echo like $like echo like $like

View File

@ -4,7 +4,7 @@ url_plc="https://plc.directory/export"
host_at=bsky.social host_at=bsky.social
url=https://plc.directory url=https://plc.directory
url_at=https://$host_at/xrpc/com.atproto.repo.listRecords url_at=https://$host_at/xrpc/com.atproto.repo.listRecords
dir=$HOME/.config/atr/txt dir=$HOME/.config/ai/txt
file=$dir/user_list.txt file=$dir/user_list.txt
dir_git_card_page=$HOME/git/card.syui.ai dir_git_card_page=$HOME/git/card.syui.ai

20
scpt/t.zsh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/zsh
f=`grep -R '$HOME/.config/atr' . |cut -d : -f 1|sort|uniq|grep -v t.zsh`
echo $f
n=`echo $f|wc -l`
for ((i=1;i<=$n;i++))
do
ff=`echo $f|awk "NR==$i"`
echo $i
echo $ff
sed 's#$HOME/.config/atr#$HOME/.config/ai#g' $ff|grep '$HOME/.config'
case $OSTYPE in
linux*)
sed -i 's#$HOME/.config/atr#$HOME/.config/ai#g' $ff
;;
darwin*)
sed -i "" 's#$HOME/.config/atr#$HOME/.config/ai#g' $ff
;;
esac
done

View File

@ -4,7 +4,7 @@ url_plc="https://plc.directory/export"
host_at=bsky.social host_at=bsky.social
url=https://plc.directory url=https://plc.directory
url_at=https://$host_at/xrpc/com.atproto.repo.listRecords url_at=https://$host_at/xrpc/com.atproto.repo.listRecords
dir=$HOME/.config/atr/txt dir=$HOME/.config/ai/txt
file=$dir/user_list.txt file=$dir/user_list.txt