metadata_filter/lib.rs
1//! A library to clean up music metadata such as artist, album and song names.
2//! This is a Rust port of the [metadata-filter](https://github.com/web-scrobbler/metadata-filter)
3//! TypeScript library.
4//!
5//! Currently, this library is mostly a collection of predefined filtering rules
6//! along with the [`apply_rules`](crate::filters::apply_rules) function which can
7//! apply a list of rules to a text.
8//!
9//! See the [`rules`](crate::rules) module for the lists of available filter rules.
10//!
11//! # Example
12//! Generally you will want to combine several filter rules and then apply them to some text:
13//! ```
14//! use metadata_filter::rules::{remastered_filter_rules, trim_whitespace_filter_rules};
15//! use metadata_filter::filters::apply_rules;
16//!
17//! let rules = [remastered_filter_rules(), trim_whitespace_filter_rules()].concat();
18//! let filtered = apply_rules("Here Comes The Sun (Remastered)", &rules);
19//!
20//! assert_eq!(filtered, "Here Comes The Sun");
21//! ```
22
23pub mod filters;
24pub mod rules;