forked from 5e-bits/5e-database
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprintname.js
More file actions
35 lines (24 loc) · 758 Bytes
/
printname.js
File metadata and controls
35 lines (24 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
var http = require('http');
var fs = require('fs');
const args = process.argv;
let data_type = args[2]
let type_check = args[3]
let results = [];
addsubclass();
function addsubclass() {
let input_filename = "z.json"
let urlfix = (err,data) => {
data = JSON.parse(data);
// number the indexes and change the URLs
for(let i = 0; i < data.length; i++) {
var level = data[i].level;
if (data[i].patrons == "Fiend") {
console.log(data[i].name);
}
}
}
fs.readFile(input_filename, 'utf8', (err,data) => {
return urlfix(err,data);
})
}
// mongoimport -h ds133158.mlab.com:33158 -d 5e-srd-api -c classfeatures -u admin -p password --file upload-5e-SRD-classfeatures.json --jsonArray