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