3 unstable releases

Uses old Rust 2015

0.4.0 Mar 2, 2019
0.3.1 Feb 25, 2019
0.3.0 Feb 24, 2019

#204 in #formatting

MIT/Apache

100KB
2.5K SLoC

titlefmt

titlefmt is a title formatting library for media files written in Rust. The aim of the project is to be conformant to the foobar2000 formatting syntax.

For more reference about the Foobar syntax, please refer to http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Title_Formatting_Reference

To try out the formatting features, an example is included with the titlefmtr executable binary. Use a formatting expression as first argument, such as "%track%. %title%", and the audio files you want to apply the title formatting to as subsequent arguments.

Example: $ cargo run --release --bin titlefmtr "%track%. [%artist% - ] %title%" test01.flac test02.mp3 music/**/*.flac

Build Status

Usage

Add this to your Cargo.toml:

[dependencies]
titlefmt = "0.4"

The library documentation is available on docs.rs.

Currently implemented functionalities

  • Field references (tags), such as %artist% or %title%, with values provided using the Provider trait.
  • Conditional selection within square brackets [ ] for sub-expressions that only appear if they contain a valid tag.
  • Advanced tag handling (expanding %tracknumber% with a leading zero if it's only one digit, aliasing %album artist% and %artist%, etc.).
  • Using functions with $function(arg1, arg2, arg3). A list of default functions with implementations provided by the crate is available. It is possible to add new functions to the title formatting script.

Currently unimplemented functionalities

  • Variables

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~1.4–3MB
~84K SLoC