2023-01-12 00:15:53 +00:00
|
|
|
use bliss_audio_symphonia::Song;
|
2021-05-14 15:35:08 +01:00
|
|
|
use std::env;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Simple utility to print the result of an Analysis.
|
|
|
|
*
|
2022-04-01 23:05:57 +01:00
|
|
|
* Takes a list of files to analyze an the result of the corresponding Analysis.
|
2021-05-14 15:35:08 +01:00
|
|
|
*/
|
|
|
|
fn main() {
|
|
|
|
let args: Vec<String> = env::args().skip(1).collect();
|
|
|
|
for path in &args {
|
2022-04-02 18:47:06 +01:00
|
|
|
match Song::from_path(&path) {
|
2021-06-01 17:02:15 +01:00
|
|
|
Ok(song) => println!("{}: {:?}", path, song.analysis),
|
2021-05-14 15:35:08 +01:00
|
|
|
Err(e) => println!("{}: {}", path, e),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|