Merge pull request #1330 from mluto/fix-extractPadData
Fixed extractPadData.js, #1320
This commit is contained in:
commit
1e723d02b1
1 changed files with 25 additions and 8 deletions
|
@ -10,17 +10,34 @@ if(process.argv.length != 3)
|
|||
//get the padID
|
||||
var padId = process.argv[2];
|
||||
|
||||
//initalize the database
|
||||
var log4js = require("log4js");
|
||||
log4js.setGlobalLogLevel("INFO");
|
||||
var async = require("async");
|
||||
var db = require('../node/db/DB');
|
||||
var dirty = require("dirty")(padId + ".db");
|
||||
var padManager;
|
||||
var pad;
|
||||
var db, dirty, padManager, pad;
|
||||
var neededDBValues = ["pad:"+padId];
|
||||
|
||||
var npm = require("../src/node_modules/npm");
|
||||
var async = require("../src/node_modules/async");
|
||||
var log4js = require("../src/node_modules/log4js");
|
||||
log4js.setGlobalLogLevel("INFO");
|
||||
|
||||
async.series([
|
||||
// load npm
|
||||
function(callback) {
|
||||
npm.load({}, function(er) {
|
||||
if(er)
|
||||
{
|
||||
console.error("Could not load NPM: " + er)
|
||||
process.exit(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
callback();
|
||||
}
|
||||
})
|
||||
},
|
||||
// load modules
|
||||
function(callback) {
|
||||
db = require('../src/node/db/DB');
|
||||
dirty = require("../src/node_modules/ueberDB/node_modules/dirty")(padId + ".db");
|
||||
},
|
||||
//intallize the database
|
||||
function (callback)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue