add feed watch
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s

This commit is contained in:
2024-08-18 01:28:04 +09:00
parent 3904c576f0
commit 84efc31248
5 changed files with 110 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ use crate::data::data_refresh;
use crate::data::url;
use crate::data::w_cfg;
use crate::data::w_refresh;
use crate::feed_watch::c_feed_watch;
use data::ProfileIdentityResolve;
@@ -39,6 +40,7 @@ pub mod session;
pub mod timeline_author;
pub mod token;
pub mod feed_get;
pub mod feed_watch;
pub mod delete_record;
fn main() {
@@ -70,6 +72,22 @@ fn main() {
.alias("f"),
)
)
.command(
Command::new("feed_watch")
.action(feed_watch)
.flag(
Flag::new("url", FlagType::String)
.alias("u"),
)
.flag(
Flag::new("tag", FlagType::String)
.alias("t"),
)
.flag(
Flag::new("debug", FlagType::Bool)
.alias("d"),
)
)
.command(
Command::new("follow_all")
.action(follow_all),
@@ -301,6 +319,13 @@ fn bot(c: &Context) {
}
}
fn feed_watch(c: &Context) {
refresh(c);
loop {
c_feed_watch(c);
}
}
fn follow_all(_c: &Context) {
c_follow_all();
}