Skip to content
/ ytfilter Public

Avoid distractions, annoyances, deceptive titles. ytfilter is a youtube rss feeds xml parser, filter, aggregator, curator. Prototype in C#, rewrite in Rust.

License

Notifications You must be signed in to change notification settings

kenf1/ytfilter

Repository files navigation

ytfilter: youtube rss feeds xml parser and filter

GitHub Tag Cargo UnitTest License: GPL v3

Avoid distractions, annoyances, deceptive titles. ytfilter is a youtube rss feeds xml parser and filter.

Prototype in C# HighlightsParser, rewritten in Rust src.

Install crate

cargo add --git https://github.com/kenf1/ytfilter

Minimal Example

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    //import channels + filters json
    let channels_json_path = env::var("CHANNELS_JSON")
        .unwrap_or_else(|_| "./data/channels_example.json".to_string());
    let filters_json_path = env::var("FILTERS_JSON")
        .unwrap_or_else(|_| "./data/filters_example.json".to_string());

    //query + filter
    let all_filters: Filters = load_filters_json(&filters_json_path)?;
    let all_filtered_entries: Vec<VideoEntry> = query_wrapper(
        &channels_json_path,
        &all_filters.keep,
        &all_filters.drop,
    )
    .await?;

    Ok(())
}

Environment variables (see data/example.env)

#required
MONGO_URI=
MONGO_DB=
MONGO_COLL=

#required, default="./data/channels_example.json"
CHANNELS_JSON=

#required, default="./data/filters_example.json"
FILTERS_JSON=

#optional, default="prod"
STATUS=

About

Avoid distractions, annoyances, deceptive titles. ytfilter is a youtube rss feeds xml parser, filter, aggregator, curator. Prototype in C#, rewrite in Rust.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •