Skip to content

Commit 153fff1

Browse files
committed
v0.1.0
1 parent 712ddf5 commit 153fff1

File tree

3 files changed

+73
-15
lines changed

3 files changed

+73
-15
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Changelog
22
=========
33

4+
### `v0.1.0` 2014-08-26
5+
6+
* Feature: Add: `Zip.add`.
7+
* Feature: Delete: `Zip.delete`.
8+
* Feature: Update: `Zip.update`.
9+
* Dependencies: Use `7za` instead of `7z` so it is easier to setup on Windows.
10+
411
### `v0.0.2` 2014-08-25
512

613
* Feature: List contents of archive: `Zip.list`.

README.md

Lines changed: 65 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Usage
1111
I chose to use *Promises* in this library. API is consistent with standard use:
1212

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

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

38-
You must have the `7z` executable available in your PATH. In some GNU/Linux
39-
distributions install the `p7zip-full`.
38+
You must have the `7za` executable available in your PATH or in the same
39+
directory of your `package.json` file.
40+
41+
> On Debian an Ubuntu install the `p7zip-full` package.
42+
43+
> On Windows use the `7za.exe` ([link here](http://netcologne.dl.sourceforge.net/project/sevenzip/7-Zip/9.20/7za920.zip))
44+
> binary.
4045
4146
```
42-
npm install --save 7z
47+
npm install --save node-7z
4348
```
4449

4550
API
4651
---
4752

53+
> See the [7-Zip documentation](http://sevenzip.sourceforge.jp/chm/cmdline/index.htm)
54+
> for the full list of usages and options (switches).
55+
56+
### Add: `Zip.add`
57+
58+
**Arguments**
59+
* `archive` Path to the archive you want to create.
60+
* `files` The file list to add.
61+
* `options` An object of options (7-Zip switches).
62+
63+
**Progress**
64+
* `files` A array of all the extracted files *AND* directories. The `/`
65+
character is used as a path separator on every platform.
66+
67+
**Error**
68+
* `err` An Error object.
69+
70+
71+
### Delete: `Zip.delete`
72+
73+
**Arguments**
74+
* `archive` Path to the archive you want to delete files from.
75+
* `files` The file list to delete.
76+
* `options` An object of options (7-Zip switches).
77+
78+
**Error**
79+
* `err` An Error object.
80+
81+
4882
### Extract: `Zip.extract`
4983

5084
**Arguments**
51-
* `archive` The path to the archive you want to analyse.
85+
* `archive` The path to the archive you want to extract.
5286
* `dest` Where to extract the archive.
5387
* `options` An object of options.
5488

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

6599
**Arguments**
66-
* `archive` The path to the archive you want to analyse.
67-
* `dest` Where to extract the archive.
100+
* `archive` The path to the archive you want to extract.
101+
* `dest` Where to extract the archive (creates folders for you).
68102
* `options` An object of options.
69103

70104
**Progress**
@@ -75,21 +109,27 @@ API
75109
* `err` An Error object.
76110

77111

78-
### Test integrity of archive: `Zip.test`
112+
### List contents of archive: `Zip.list`
79113

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

84118
**Progress**
85-
* `files` A array of all the extracted files *AND* directories. The `/`
86-
character is used as a path separator on every platform.
119+
* `files` A array of objects of all the extracted files *AND* directories.
120+
The `/` character is used as a path separator on every platform. Object's
121+
properties are: `date`, `attr`, `size` and `name`.
122+
123+
**Fulfill**
124+
* `spec` An object of tech spec about the archive. Properties are: `path`,
125+
`type`, `method`, `physicalSize` and `headersSize` (Some of them may be
126+
missing with non-7z archives).
87127

88128
**Error**
89129
* `err` An Error object.
90130

91131

92-
### List contents of archive: `Zip.list`
132+
### Test integrity of archive: `Zip.test`
93133

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

102-
**Fulfill**
103-
* `spec` An object of tech spec about the archive. Properties are: `date`,
104-
`attr`, `size` and `name`.
142+
**Error**
143+
* `err` An Error object.
144+
145+
146+
### Update: `Zip.update`
147+
148+
**Arguments**
149+
* `archive` Path to the archive you want to update.
150+
* `files` The file list to update.
151+
* `options` An object of options (7-Zip switches).
152+
153+
**Progress**
154+
* `files` A array of all the extracted files *AND* directories. The `/`
155+
character is used as a path separator on every platform.
105156

106157
**Error**
107158
* `err` An Error object.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-7z",
3-
"version": "0.0.3",
3+
"version": "0.1.0",
44
"description": "A Node.js wrapper for 7-Zip",
55
"main": "lib/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)