add feed watch
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s
This commit is contained in:
25
src/main.rs
25
src/main.rs
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user