-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnewnum.js
executable file
·41 lines (31 loc) · 1.45 KB
/
newnum.js
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
36
37
38
39
40
41
/*jslint node: true */
/*jslint es5: true */
/*jslint nomen: true */
var renum = require('./lib/renum'),
path = require('path'),
argv = require('yargs')
.usage('Herberekent en allokeerd nummers voor optimale spreiding.\nUsage: $0')
.example('$0 -k data/renum/knoop.csv -l data/renum/link.csv', 'Will process the topology in the files.')
.describe('output', 'Output directory to put data in.')
.alias('o', 'output')
.default('o', '/tmp/renum')
.describe('linkbase', 'Location of linkbase.csv to work with')
.alias('l', 'linkbase')
.default('linkbase', path.join(__dirname, 'data', 'renum', 'link.csv'))
.describe('knoopbase', 'Location of knoopbase.csv to work with')
.alias('k', 'knoopbase')
.default('knoopbase', path.join(__dirname, 'data', 'renum', 'knoop.csv'))
.describe('min', 'the shortest links that do not need reporting')
.alias('m', 'min')
.default('min', 0.059)
.describe('MAX', 'the longest links that do not need reporting')
.alias('M', 'MAX')
.default('MAX', 10.0)
.describe('cutoff', 'the last known code for existing codes, al new ones should be bigger')
.alias('c', 'cutoff')
.default('cutoff', 'T0')
.describe('spare', 'the numbers to spare and not use')
.alias('s', 'spare')
.default('spare', '7,19,37,41,43,51,79,87,91')
.argv;
renum.doWork(argv);