fix sp
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 5s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 5s
This commit is contained in:
parent
99d7757cfd
commit
127dde8b49
18
docs/wiki.md
18
docs/wiki.md
@ -1,11 +1,11 @@
|
|||||||
### test-notify
|
## test-notify
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
./target/debug/ai n|jq -r ".notifications|.[].cid" >> ~/.config/ai/txt/notify_cid*
|
./target/debug/ai n|jq -r ".notifications|.[].cid" >> ~/.config/ai/txt/notify_cid*
|
||||||
./target/debug/ai bot
|
./target/debug/ai bot
|
||||||
```
|
```
|
||||||
|
|
||||||
### docker
|
## docker
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ docker run -it syui/aios ai
|
$ docker run -it syui/aios ai
|
||||||
@ -18,7 +18,7 @@ $ cp -rf ~/.config/ai ./.config/
|
|||||||
$ docker compose up
|
$ docker compose up
|
||||||
```
|
```
|
||||||
|
|
||||||
### cron
|
## cron
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ sudo pacman -S fcron
|
$ sudo pacman -S fcron
|
||||||
@ -26,7 +26,7 @@ $ fcrontab -e
|
|||||||
* * * * * $HOME/bot/test/ai.zsh c
|
* * * * * $HOME/bot/test/ai.zsh c
|
||||||
```
|
```
|
||||||
|
|
||||||
### ssh
|
## ssh
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ ssh-keygen -f /.ssh/diffusers.key -t ed25519
|
$ ssh-keygen -f /.ssh/diffusers.key -t ed25519
|
||||||
@ -58,9 +58,17 @@ services:
|
|||||||
command: ai bot -a syui.syu.is
|
command: ai bot -a syui.syu.is
|
||||||
```
|
```
|
||||||
|
|
||||||
### openapi
|
## openapi
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# https://github.com/rdmurphy/atproto-openapi-types
|
# https://github.com/rdmurphy/atproto-openapi-types
|
||||||
$ curl -sLO https://raw.githubusercontent.com/rdmurphy/atproto-openapi-types/main/spec/api.json
|
$ curl -sLO https://raw.githubusercontent.com/rdmurphy/atproto-openapi-types/main/spec/api.json
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## plc
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# 何度か実行するとplcをlatestまでexportされる
|
||||||
|
$ .config/ai/scpt/test/pds.zsh e
|
||||||
|
```
|
||||||
|
|
||||||
|
16
src/bot.rs
16
src/bot.rs
@ -118,7 +118,7 @@ pub fn c_bot(c: &Context) {
|
|||||||
w_cid(cid.to_string(), log_file(&"n1"), true);
|
w_cid(cid.to_string(), log_file(&"n1"), true);
|
||||||
println!("{}", str_rep);
|
println!("{}", str_rep);
|
||||||
}
|
}
|
||||||
} else if com == "help" {
|
} else if com == "help" || com == "/help" {
|
||||||
let link = "https://git.syui.ai/ai/bot/wiki/help".to_string();
|
let link = "https://git.syui.ai/ai/bot/wiki/help".to_string();
|
||||||
let s = 0;
|
let s = 0;
|
||||||
let e = link.chars().count();
|
let e = link.chars().count();
|
||||||
@ -135,7 +135,7 @@ pub fn c_bot(c: &Context) {
|
|||||||
.await;
|
.await;
|
||||||
w_cid(cid.to_string(), log_file(&"n1"), true);
|
w_cid(cid.to_string(), log_file(&"n1"), true);
|
||||||
println!("{}", str_rep);
|
println!("{}", str_rep);
|
||||||
} else if com == "diffusers" {
|
} else if com == "diffusers" || com == "/diffusers" {
|
||||||
let _output = Command::new(data_scpt(&"ai"))
|
let _output = Command::new(data_scpt(&"ai"))
|
||||||
.arg(&"atproto").arg(&"diffusers")
|
.arg(&"atproto").arg(&"diffusers")
|
||||||
.arg(&handle)
|
.arg(&handle)
|
||||||
@ -174,7 +174,7 @@ pub fn c_bot(c: &Context) {
|
|||||||
println!("{}", text_limit);
|
println!("{}", text_limit);
|
||||||
w_cid(cid.to_string(), log_file(&"n1"), true);
|
w_cid(cid.to_string(), log_file(&"n1"), true);
|
||||||
}
|
}
|
||||||
} else if com == "card" {
|
} else if com == "card" || com == "/card" {
|
||||||
let output = Command::new(data_scpt(&"ai"))
|
let output = Command::new(data_scpt(&"ai"))
|
||||||
.arg(&"atproto").arg(&"card")
|
.arg(&"atproto").arg(&"card")
|
||||||
.arg(&handle)
|
.arg(&handle)
|
||||||
@ -210,7 +210,7 @@ pub fn c_bot(c: &Context) {
|
|||||||
println!("{}", str_rep);
|
println!("{}", str_rep);
|
||||||
w_cid(cid.to_string(), log_file(&"n1"), true);
|
w_cid(cid.to_string(), log_file(&"n1"), true);
|
||||||
}
|
}
|
||||||
} else if com == "fav" {
|
} else if com == "fav" || com == "/fav" {
|
||||||
let output = Command::new(data_scpt(&"ai"))
|
let output = Command::new(data_scpt(&"ai"))
|
||||||
.arg(&"atproto").arg(&"fav")
|
.arg(&"atproto").arg(&"fav")
|
||||||
.arg(&handle)
|
.arg(&handle)
|
||||||
@ -245,7 +245,7 @@ pub fn c_bot(c: &Context) {
|
|||||||
println!("{}", str_rep);
|
println!("{}", str_rep);
|
||||||
w_cid(cid.to_string(), log_file(&"n1"), true);
|
w_cid(cid.to_string(), log_file(&"n1"), true);
|
||||||
}
|
}
|
||||||
} else if com == "egg" {
|
} else if com == "egg" || com == "/egg" {
|
||||||
let output = Command::new(data_scpt(&"ai"))
|
let output = Command::new(data_scpt(&"ai"))
|
||||||
.arg(&"atproto").arg(&"egg")
|
.arg(&"atproto").arg(&"egg")
|
||||||
.arg(&handle)
|
.arg(&handle)
|
||||||
@ -280,7 +280,7 @@ pub fn c_bot(c: &Context) {
|
|||||||
println!("{}", str_rep);
|
println!("{}", str_rep);
|
||||||
w_cid(cid.to_string(), log_file(&"n1"), true);
|
w_cid(cid.to_string(), log_file(&"n1"), true);
|
||||||
}
|
}
|
||||||
} else if com == "nyan" {
|
} else if com == "nyan" || com == "/nyan" {
|
||||||
let output = Command::new(data_scpt(&"ai"))
|
let output = Command::new(data_scpt(&"ai"))
|
||||||
.arg(&"atproto").arg(&"nyan")
|
.arg(&"atproto").arg(&"nyan")
|
||||||
.arg(&handle)
|
.arg(&handle)
|
||||||
@ -310,7 +310,7 @@ pub fn c_bot(c: &Context) {
|
|||||||
println!("{}", str_rep);
|
println!("{}", str_rep);
|
||||||
w_cid(cid.to_string(), log_file(&"n1"), true);
|
w_cid(cid.to_string(), log_file(&"n1"), true);
|
||||||
}
|
}
|
||||||
} else if com == "ten" {
|
} else if com == "ten" || com == "/ten" {
|
||||||
let output = Command::new(data_scpt(&"ai"))
|
let output = Command::new(data_scpt(&"ai"))
|
||||||
.arg(&"atproto").arg(&"ten")
|
.arg(&"atproto").arg(&"ten")
|
||||||
.arg(&handle)
|
.arg(&handle)
|
||||||
@ -345,7 +345,7 @@ pub fn c_bot(c: &Context) {
|
|||||||
println!("{}", str_rep);
|
println!("{}", str_rep);
|
||||||
w_cid(cid.to_string(), log_file(&"n1"), true);
|
w_cid(cid.to_string(), log_file(&"n1"), true);
|
||||||
}
|
}
|
||||||
} else if com == "coin" {
|
} else if com == "coin" || com == "/coin" {
|
||||||
let output = Command::new(data_scpt(&"ai"))
|
let output = Command::new(data_scpt(&"ai"))
|
||||||
.arg(&"atproto").arg(&"coin")
|
.arg(&"atproto").arg(&"coin")
|
||||||
.arg(&handle)
|
.arg(&handle)
|
||||||
|
Loading…
Reference in New Issue
Block a user