Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yibn2008/progress-extract
extract compress file with progress bar
https://github.com/yibn2008/progress-extract
extract progress-bar tar-gzip zip
Last synced: about 1 month ago
JSON representation
extract compress file with progress bar
- Host: GitHub
- URL: https://github.com/yibn2008/progress-extract
- Owner: yibn2008
- Created: 2017-07-27T09:34:17.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-28T05:31:38.000Z (over 7 years ago)
- Last Synced: 2024-11-16T03:47:06.976Z (about 2 months ago)
- Topics: extract, progress-bar, tar-gzip, zip
- Language: JavaScript
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
Awesome Lists containing this project
README
# progress-extract
extract compress file with progress bar, support CLI and node API
## Screenshot
![progress-extract](https://user-images.githubusercontent.com/4136679/28699990-8995b946-737f-11e7-9f61-af0d19534f8a.gif)
## CLI
### Install
Install as a global module
```bash
$ npm install progress-extract -g
```### Usage
Use `extract` command to extract file
```bash
$ extract -hUsage: extract
extract file with progress bar
Options:
-V, --version output the version number
-d, --directory target dir to extract
-h, --help output usage informationExamples:
$ extract example.tar.gz
```
## Node API
### Usage
```js
const extract = require('progress-extract')let file = '/path/to/example.tar.gz'
let target = process.cwd()
extract(file, target)
.then(() => {
console.log('extract succeed')
}, err => {
console.log('extract failed')
})
```### API
```js
extract(source, [destination])
```- source: source file (support `.zip`, `.tgz`, `.tar.gz`)
- destination: path where you extract toReturn Promise
## License
MIT