#download #github #file #process #directory #single #downloader-builder

gitload

download any single file or dir from github

4 releases

0.1.3 Jan 6, 2025
0.1.2 Jan 5, 2025
0.1.1 Jan 3, 2025
0.1.0 Jan 3, 2025

#44 in #single

Download history 324/week @ 2025-01-01 22/week @ 2025-01-08

346 downloads per month

MIT license

13KB
189 lines

gitload

Gitload is a Rust library for downloading specific folders from GitHub repositories.

usage

use anyhow::Result;
use gitload::DownloaderBuilder;

#[tokio::main]
async fn main() -> Result<()> {
    let downloader = DownloaderBuilder::new("<user>", "<repo>", "<directory>")
        .on_process(|process| {
            println!(
                "process: {}/{}\t{:.0}%",
                process.current,
                process.all,
                process.percent() * 100.
            );
        })
        .build();
    downloader.download().await
}

Dependencies

~7–18MB
~238K SLoC