Skip to content

Commit

Permalink
Merge PR #12, update tar.
Browse files Browse the repository at this point in the history
  • Loading branch information
moos committed May 13, 2017
1 parent d03d5c8 commit e5d1006
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ wndb.version (string) -- version string of WordNet database file
Changes
---------

3.1.3 -- Updated with PR #12.

3.1.2 -- repository renamed to wordnet-db.

3.1.1 -- fixed WNdb tar folder structure.
Expand All @@ -89,7 +91,7 @@ License
-------

wordnet-db package:
Copyright (c) 2012, 2014, 2016, mooster@42at.com
Copyright (c) 2012-2017, mooster@42at.com
(The MIT License)

See LICENSE file for complete Princeton University WordNet(r) License.
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
"name": "wordnet-db",
"description": "WordNet 3.1 Database files",
"keywords": ["WordNet", "wordpos", "natural", "pos"],
"version": "3.1.2",
"version": "3.1.3",
"homepage": "http://wordnet.princeton.edu/",
"license" :"MIT",
"repository": {
"type": "git",
"url": "git://github.com/moos/wordnet-db.git"
},
"dependencies": {
"tar": "3.0.1"
"tar": "^3.1"
},
"devDependencies": {},
"optionalDependencies": {},
Expand Down
16 changes: 7 additions & 9 deletions unpack.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
/*
* this script will unpack the WordNet DB file at install-time
* Usage: node unpack.js WNdb-3.1.tar.gz
* Requires build-it 'zlib' (node >= 0.6)
*/
var log = console.log;

if (process.argv.length < 3) {
log('Missing tar.gz file to extract.');
process.exit(1);
}

var tarball = process.argv[2]
, fs = require("fs")
, tar = require("tar")
, zlib = require("zlib")
, fs = require('fs')
, tar = require('tar');

log("Extracting %s",tarball);
log('Extracting %s', tarball);

fs.createReadStream(tarball)
.on("error", log)
.pipe(zlib.Unzip())
.pipe(tar.extract({ path: __dirname }))
.on("end", log);
.on('error', log)
.on('end', log)
.pipe(tar.extract({ path: __dirname }));

0 comments on commit e5d1006

Please sign in to comment.