diff --git a/test/ai.zsh b/test/ai.zsh index d53abc1..ce07dc0 100755 --- a/test/ai.zsh +++ b/test/ai.zsh @@ -14,6 +14,7 @@ source $d/refresh.zsh source $d/token.zsh source $d/reply.zsh source $d/notify.zsh +source $d/notify_cid.zsh source $d/cron.zsh case $1 in @@ -32,4 +33,7 @@ case $1 in cron|c) cron ;; + cid) + cid + ;; esac diff --git a/test/notify_cid.zsh b/test/notify_cid.zsh new file mode 100644 index 0000000..b492d98 --- /dev/null +++ b/test/notify_cid.zsh @@ -0,0 +1,12 @@ + +function cid(){ + dd=${d:h} + ai=$dd/target/debug/ai + f=$dd/.config/ai/txt/notify_cid + if [ ! -f $ai ];then + cd $dd + cargo build + fi + $ai n|jq -r ".[]|.[]?.cid" >> $f.txt + cp -rf $f.txt ${f}_run.txt +}