Output progress
This commit is contained in:
@@ -125,7 +125,8 @@ fn download_catalog(catalog_name: &str, out_dir: &Path, auth: &str) {
|
|||||||
println!("Starting to download {} presentations!",
|
println!("Starting to download {} presentations!",
|
||||||
presentations.len());
|
presentations.len());
|
||||||
|
|
||||||
for presentation in presentations {
|
for (i, presentation) in presentations.iter().enumerate() {
|
||||||
|
println!("Downloading {}/{}: {}", i + 1, presentations.len(), presentation.name);
|
||||||
download_presentation(&presentation, out_dir, auth);
|
download_presentation(&presentation, out_dir, auth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -150,8 +151,6 @@ fn get_catalog_id(name: &str, auth: &str) -> String {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn download_presentation(presentation: &Presentation, out_dir: &Path, auth: &str) {
|
fn download_presentation(presentation: &Presentation, out_dir: &Path, auth: &str) {
|
||||||
println!("Downloading: {}", presentation.name);
|
|
||||||
|
|
||||||
let response = CLIENT.get(&presentation.download_url)
|
let response = CLIENT.get(&presentation.download_url)
|
||||||
.header(construct_cookie(auth))
|
.header(construct_cookie(auth))
|
||||||
.send()
|
.send()
|
||||||
|
Reference in New Issue
Block a user