titlefmt

Crates.iotitlefmt
lib.rstitlefmt
version0.4.0
sourcesrc
created_at2019-02-24 20:46:33.232503
updated_at2019-03-02 22:21:09.15462
descriptionMetadata Title Formatting Library
homepage
repositoryhttps://github.com/suntorvic/titlefmt
max_upload_size
id116950
size112,250
Victor Nivet (flmmkch)

documentation

README

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.

Commit count: 72

cargo fmt