Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eagr/dlxt
ergonomic download & extract
https://github.com/eagr/dlxt
Last synced: 27 days ago
JSON representation
ergonomic download & extract
- Host: GitHub
- URL: https://github.com/eagr/dlxt
- Owner: eagr
- License: apache-2.0
- Created: 2023-05-06T12:45:23.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-05-11T05:05:14.000Z (over 1 year ago)
- Last Synced: 2024-10-28T04:00:03.577Z (3 months ago)
- Language: Rust
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# dlxt
ergonomic download & extract
```toml
[dependencies]
dlxt = { git = "https://github.com/eagr/dlxt.git", branch = "master" }
```## Features
- [x] parallel downloads
- [x] auto extraction by extension
* `.tar`
* `.bz2` `.gz` `.xz`
- [ ] async downloads**Download and extract MNIST**
```rs
fn main() -> Result<(), Box> {
dlxt::dlxt_sync(
&[
"http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz",
"http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz",
"http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz",
"http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz",
],
"./mnist"
)?;Ok(())
}// ./mnist/t10k-images-idx3-ubyte
// ./mnist/t10k-labels-idx1-ubyte
// ./mnist/train-images-idx3-ubyte
// ./mnist/train-labels-idx1-ubyte
```**Download and extract 7z**
```rs
fn main() -> Result<(), Box> {
dlxt::dlxt_sync(
&["https://www.7-zip.org/a/7z2201-linux-x64.tar.xz"],
"./7z",
)?;Ok(())
}
```## License
Licensed under either [MIT](/LICENSE-MIT) or [Apache License 2.0](/LICENSE-APACHE) at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in
this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without
any additional terms or conditions.