2024-03-07 02:26:07 -05:00
|
|
|
<img align="right" width="200" height="200" src="doc/lofty.svg" alt="Lofty logo">
|
|
|
|
|
2021-04-02 20:50:28 -04:00
|
|
|
# Lofty
|
2024-03-07 02:26:07 -05:00
|
|
|
|
|
|
|
*Parse, convert, and write metadata to various audio formats.*
|
|
|
|
|
2022-12-15 22:15:32 -05:00
|
|
|
[](https://github.com/Serial-ATA/lofty-rs/actions/workflows/ci.yml)
|
2021-04-23 18:12:55 -04:00
|
|
|
[](https://crates.io/crates/lofty)
|
|
|
|
[](https://crates.io/crates/lofty)
|
2021-04-22 22:11:04 -04:00
|
|
|
[](https://docs.rs/lofty/)
|
2024-05-04 16:33:22 -04:00
|
|
|
[](https://github.com/sponsors/Serial-ATA)
|
2020-10-25 16:29:14 +00:00
|
|
|
|
2022-10-13 19:53:28 -04:00
|
|
|
⚠️ **LOOKING FOR HELP WITH DOCUMENTATION** ⚠️
|
|
|
|
|
|
|
|
I'm looking for help with the refinement of the docs. Any contribution, whether it be typos,
|
|
|
|
grammar, punctuation, or missing examples is highly appreciated!
|
|
|
|
|
2021-04-03 23:15:06 -04:00
|
|
|
## Supported Formats
|
2020-10-25 21:39:38 +00:00
|
|
|
|
2022-10-11 19:51:49 -04:00
|
|
|
[See here](./SUPPORTED_FORMATS.md)
|
2020-10-25 21:39:38 +00:00
|
|
|
|
2021-12-20 09:44:38 -05:00
|
|
|
## Examples
|
2021-12-12 12:47:26 -05:00
|
|
|
|
2024-09-15 04:22:29 -04:00
|
|
|
* [Tag reader](https://github.com/Serial-ATA/lofty-rs/blob/main/examples/tag_reader.rs)
|
|
|
|
* [Tag stripper](https://github.com/Serial-ATA/lofty-rs/blob/main/examples/tag_stripper.rs)
|
|
|
|
* [Tag writer](https://github.com/Serial-ATA/lofty-rs/blob/main/examples/tag_writer.rs)
|
|
|
|
* [Custom resolver](https://github.com/Serial-ATA/lofty-rs/tree/main/examples/custom_resolver)
|
2021-12-12 12:47:26 -05:00
|
|
|
|
2021-12-20 09:44:38 -05:00
|
|
|
To try them out, run:
|
2021-12-12 12:47:26 -05:00
|
|
|
|
|
|
|
```bash
|
|
|
|
cargo run --example tag_reader /path/to/file
|
2021-12-20 09:44:38 -05:00
|
|
|
cargo run --example tag_stripper /path/to/file
|
2022-03-15 20:52:10 -04:00
|
|
|
cargo run --example tag_writer <options> /path/to/file
|
2022-07-24 16:08:46 -04:00
|
|
|
cargo run --example custom_resolver
|
2021-12-12 12:47:26 -05:00
|
|
|
```
|
|
|
|
|
2021-04-03 23:15:06 -04:00
|
|
|
## Documentation
|
2021-04-21 14:48:45 -04:00
|
|
|
|
2021-04-03 23:15:06 -04:00
|
|
|
Available [here](https://docs.rs/lofty)
|
|
|
|
|
2024-08-31 13:42:17 -04:00
|
|
|
## Testing
|
|
|
|
|
|
|
|
As some formats are complex, Lofty makes use of [test-log](https://crates.io/crates/test-log) to get
|
|
|
|
the detailed debug/trace logging for failures. To run the tests, do:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
RUST_LOG=trace cargo test
|
|
|
|
```
|
|
|
|
|
2022-10-15 10:45:51 -04:00
|
|
|
## Benchmarking
|
|
|
|
|
2024-04-26 08:22:12 -04:00
|
|
|
There are benchmarks available [here](./benches). To run them, do:
|
2022-10-15 10:45:51 -04:00
|
|
|
|
|
|
|
```shell
|
2024-04-26 08:22:12 -04:00
|
|
|
cargo bench
|
2022-10-15 10:45:51 -04:00
|
|
|
```
|
|
|
|
|
2021-04-03 23:11:35 -04:00
|
|
|
## License
|
|
|
|
|
|
|
|
Licensed under either of
|
|
|
|
|
|
|
|
* Apache License, Version 2.0
|
|
|
|
([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
|
|
|
|
* MIT license
|
|
|
|
([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
|
|
|
|
|
|
|
|
at your option.
|
|
|
|
|
|
|
|
## Contribution
|
2020-10-25 16:29:14 +00:00
|
|
|
|
2021-04-03 23:11:35 -04:00
|
|
|
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.
|