v0.1
This commit is contained in:
.config
.gitignoreCargo.tomlDockerfileREADME.mdai.zshdocs
icon
scpt
api_card.zshapi_card_raid_win.zshapi_chara.zshapi_egg.zshapi_fav.zshapi_gift.zshapi_ten.zshapi_ten_auto.zshapi_ten_su_reset.zsharch.zshat_img.zshat_search.zshbluesky.zshbot_card.zshbot_kawaii.zshbot_list.zshbsky_token.zshcard_box.zshcard_fortune.zshcard_fortune_en.zshcard_pay.zshcard_tarot.zshcard_tarot_en.zshdiffusers.zshdig.zshfan_art.zshfollow_all.zshfull_moon.jinvite.zshlike_reply.zshmastodon.zshnyancat.zshnyancat_post.zshopenai_like.zshopenai_like_bot.zshopenai_like_timeline.zshphoto.zshstable_diffusion_prompt.juser_day_post.zshuser_list.zshuser_search.zshuser_service.zsh
src
ascii.rsbot.rsdata.rsdescribe.rsfollow.rsfollowers.rsfollows.rsimg.rsimg_reply.rsimg_upload.rslike.rsmain.rsmention.rsnotify.rsnotify_read.rsopenai.rspost.rspost_link.rsprofile.rsrefresh.rsreply.rsreply_link.rsreply_og.rsrepost.rssession.rstimeline_author.rstoken.rs
test
34
test/env
Normal file
34
test/env
Normal file
@@ -0,0 +1,34 @@
|
||||
cfg=~/.config/ai/test.json
|
||||
|
||||
if [ ! -f $cfg ] || ! cat $cfg|jq . || [ "`cat $cfg|jq .host`" = "null" ] || [ -z "`cat $cfg`" ];then
|
||||
mkdir -p ~/.config/ai
|
||||
echo server:
|
||||
read host
|
||||
|
||||
echo password:
|
||||
read pass
|
||||
|
||||
echo handle:
|
||||
read handle
|
||||
|
||||
echo "{ \"host\":\"$host\", \"password\":\"$pass\", \"handle\":\"$handle\" }" >> $cfg
|
||||
fi
|
||||
|
||||
host=`cat $cfg|jq -r .host`
|
||||
handle=`cat $cfg|jq -r .handle`
|
||||
pass=`cat $cfg|jq -r .password`
|
||||
date=`date --iso-8601=seconds`
|
||||
|
||||
if [ ! -f $cfg.t ];then
|
||||
$d/token.zsh
|
||||
fi
|
||||
|
||||
if [ -f $cfg.t ];then
|
||||
token=`cat $cfg.t|jq -r .accessJwt`
|
||||
refresh=`cat $cfg.t|jq -r .refreshJwt`
|
||||
did=`cat $cfg.t|jq -r .did`
|
||||
fi
|
||||
|
||||
if [ ! -d $d/json ];then
|
||||
mkdir -p $d/json
|
||||
fi
|
Reference in New Issue
Block a user