diff --git a/.config/ai/scpt b/.config/ai/scpt index 4d90d5a..d06b0df 160000 --- a/.config/ai/scpt +++ b/.config/ai/scpt @@ -1 +1 @@ -Subproject commit 4d90d5a9d155f13ae0b09cc825bdeb468406bf9b +Subproject commit d06b0df7125fa387b16894ec79b6343040fae225 diff --git a/docs/wiki.md b/docs/wiki.md index 6cd280f..c5886aa 100644 --- a/docs/wiki.md +++ b/docs/wiki.md @@ -72,12 +72,34 @@ $ curl -sLO https://raw.githubusercontent.com/rdmurphy/atproto-openapi-types/mai $ .config/ai/scpt/test/pds.zsh e ``` -## manga +## cmt + +blogなどにblueskyアカウントのpostを表示します。 + +以下でbotがblogのコメントシステムを開きます。 ```sh -$ ai bot --manga_uri at://did:plc:dconvttcori3mrh2wrmehvwt/app.bsky.feed.post/3kp4zdnlo5s2j +@yui.syui.ai /comment https://syui.ai/blog/post/2024/04/25/bluesky/ ``` +開いたbotのpostに返信することで、特定のblog path上でpostを表示します。 + +> please reply with your comments here ↓ + +

please reply with your comments here ↓ +

— ai (@yui.syui.ai) Apr 25, 2024 at 20:18
+ +```ts + + +
+ + + +``` + +## example json + ```json [ { @@ -165,10 +187,6 @@ $ ai bot --manga_uri at://did:plc:dconvttcori3mrh2wrmehvwt/app.bsky.feed.post/3k ] ``` -```sh -$ ai bot -a syui.ai --manga_uri at://did:plc:4hqjfn7m6n5hno3doamuhgef/app.bsky.feed.post/3kp5qn72s232q -``` - ```json { "uri": "at://did:plc:uqzpqmrjnptsxezjx4xuh2mn/app.bsky.feed.post/3kp5qniyzm42h", diff --git a/src/bot.rs b/src/bot.rs index 527c2c0..2a43583 100644 --- a/src/bot.rs +++ b/src/bot.rs @@ -97,11 +97,6 @@ pub fn c_bot(c: &Context) { admin = c.string_flag("admin").unwrap(); } - let mut manga_uri = "".to_string(); - if c.string_flag("manga_uri").is_ok() { - manga_uri = c.string_flag("manga_uri").unwrap(); - } - let mut avatar = "".to_string(); if let Some(v) = &n[i].author.avatar { avatar = v.to_string(); @@ -515,34 +510,6 @@ pub fn c_bot(c: &Context) { println!("{}", str_rep); w_cid(cid.to_string(), log_file(&"n1"), true); } - } else if uri_root == &manga_uri { - println!("manga_uri:{}", manga_uri); - let output = Command::new(data_scpt(&"ai")) - .arg(&"atproto").arg(&"manga") - .arg(&handle) - .arg(&did) - .arg(&cid) - .arg(&uri) - .arg(&cid_root) - .arg(&uri_root) - .arg(&host) - .arg(&avatar) - .arg(&prompt_chat) - .output() - .expect("zsh"); - let d = String::from_utf8_lossy(&output.stdout); - let d = d.to_string(); - let text_limit = c_char(d); - let str_rep = reply::post_request( - text_limit.to_string(), - cid.to_string(), - uri.to_string(), - cid_root.to_string(), - uri_root.to_string(), - ) - .await; - println!("{}", str_rep); - w_cid(cid.to_string(), log_file(&"n1"), true); } else if { com == "comment" || com == "/comment" } && handle == &admin && check_uri_comment == false { println!("admin:{}", admin); let output = Command::new(data_scpt(&"ai")) diff --git a/src/main.rs b/src/main.rs index 6d20abd..5646f41 100644 --- a/src/main.rs +++ b/src/main.rs @@ -66,9 +66,6 @@ fn main() { Flag::new("feed", FlagType::String) .alias("f"), ) - .flag( - Flag::new("manga_uri", FlagType::String) - ) ) .command( Command::new("follow_all")