diff --git a/src/download.rs b/src/download.rs index 19121ca..01ca238 100644 --- a/src/download.rs +++ b/src/download.rs @@ -1,7 +1,7 @@ /// Download all the posts pub async fn download_posts( posts: (String, Vec), - dir: String, + dir: &String, download_special_files: bool, ) { // Create folder, silently ignore if already exists @@ -9,7 +9,7 @@ pub async fn download_posts( // Download all the posts for post in posts.1 { - download(&posts.0, &dir, post, "md").await; + download(&posts.0, dir, post, "md").await; } // Check if specials files need to be downloaded @@ -20,7 +20,7 @@ pub async fn download_posts( ]; for file in special_files { - download(&posts.0, &dir, file.0, file.1).await; + download(&posts.0, dir, file.0, file.1).await; } } } diff --git a/src/main.rs b/src/main.rs index 2b94dfc..54f140d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -37,6 +37,7 @@ async fn main() { let cli = Cli::parse(); // Retrieve user's posts + println!("Retrieving posts..."); let posts = parse::get_posts( cli.scheme.to_lowercase(), cli.username.to_lowercase(), @@ -51,5 +52,7 @@ async fn main() { }; // Download the posts - download::download_posts(posts, directory, cli.special_files).await; + println!("Downloads posts..."); + download::download_posts(posts, &directory, cli.special_files).await; + println!("Download completed in {}/ folder.", directory); }