Skip to content

Commit

Permalink
v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
q2s2t committed Aug 26, 2014
1 parent 712ddf5 commit 153fff1
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 15 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Changelog
=========

### `v0.1.0` 2014-08-26

* Feature: Add: `Zip.add`.
* Feature: Delete: `Zip.delete`.
* Feature: Update: `Zip.update`.
* Dependencies: Use `7za` instead of `7z` so it is easier to setup on Windows.

### `v0.0.2` 2014-08-25

* Feature: List contents of archive: `Zip.list`.
Expand Down
79 changes: 65 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Usage
I chose to use *Promises* in this library. API is consistent with standard use:

```js
var Zip = require('7z'); // Name the class as you want!
var Zip = require('node-7z'); // Name the class as you want!
var myTask = new Zip();
myTask.extractFull('myArchive.7z', 'destination', { p: 'myPassword' })

Expand All @@ -35,20 +35,54 @@ myTask.extractFull('myArchive.7z', 'destination', { p: 'myPassword' })
Installation
------------

You must have the `7z` executable available in your PATH. In some GNU/Linux
distributions install the `p7zip-full`.
You must have the `7za` executable available in your PATH or in the same
directory of your `package.json` file.

> On Debian an Ubuntu install the `p7zip-full` package.
> On Windows use the `7za.exe` ([link here](http://netcologne.dl.sourceforge.net/project/sevenzip/7-Zip/9.20/7za920.zip))
> binary.
```
npm install --save 7z
npm install --save node-7z
```

API
---

> See the [7-Zip documentation](http://sevenzip.sourceforge.jp/chm/cmdline/index.htm)
> for the full list of usages and options (switches).
### Add: `Zip.add`

**Arguments**
* `archive` Path to the archive you want to create.
* `files` The file list to add.
* `options` An object of options (7-Zip switches).

**Progress**
* `files` A array of all the extracted files *AND* directories. The `/`
character is used as a path separator on every platform.

**Error**
* `err` An Error object.


### Delete: `Zip.delete`

**Arguments**
* `archive` Path to the archive you want to delete files from.
* `files` The file list to delete.
* `options` An object of options (7-Zip switches).

**Error**
* `err` An Error object.


### Extract: `Zip.extract`

**Arguments**
* `archive` The path to the archive you want to analyse.
* `archive` The path to the archive you want to extract.
* `dest` Where to extract the archive.
* `options` An object of options.

Expand All @@ -63,8 +97,8 @@ API
### Extract with full paths: `Zip.extractFull`

**Arguments**
* `archive` The path to the archive you want to analyse.
* `dest` Where to extract the archive.
* `archive` The path to the archive you want to extract.
* `dest` Where to extract the archive (creates folders for you).
* `options` An object of options.

**Progress**
Expand All @@ -75,21 +109,27 @@ API
* `err` An Error object.


### Test integrity of archive: `Zip.test`
### List contents of archive: `Zip.list`

**Arguments**
* `archive` The path to the archive you want to analyse.
* `options` An object of options.

**Progress**
* `files` A array of all the extracted files *AND* directories. The `/`
character is used as a path separator on every platform.
* `files` A array of objects of all the extracted files *AND* directories.
The `/` character is used as a path separator on every platform. Object's
properties are: `date`, `attr`, `size` and `name`.

**Fulfill**
* `spec` An object of tech spec about the archive. Properties are: `path`,
`type`, `method`, `physicalSize` and `headersSize` (Some of them may be
missing with non-7z archives).

**Error**
* `err` An Error object.


### List contents of archive: `Zip.list`
### Test integrity of archive: `Zip.test`

**Arguments**
* `archive` The path to the archive you want to analyse.
Expand All @@ -99,9 +139,20 @@ API
* `files` A array of all the extracted files *AND* directories. The `/`
character is used as a path separator on every platform.

**Fulfill**
* `spec` An object of tech spec about the archive. Properties are: `date`,
`attr`, `size` and `name`.
**Error**
* `err` An Error object.


### Update: `Zip.update`

**Arguments**
* `archive` Path to the archive you want to update.
* `files` The file list to update.
* `options` An object of options (7-Zip switches).

**Progress**
* `files` A array of all the extracted files *AND* directories. The `/`
character is used as a path separator on every platform.

**Error**
* `err` An Error object.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-7z",
"version": "0.0.3",
"version": "0.1.0",
"description": "A Node.js wrapper for 7-Zip",
"main": "lib/index.js",
"scripts": {
Expand Down

0 comments on commit 153fff1

Please sign in to comment.