-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.js
60 lines (50 loc) · 1.47 KB
/
index.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
require('dotenv').config()
const commandLineArgs = require('command-line-args')
const volunteers = require('./lib/volunteers')
const screenshots = require('./lib/screenshots')
const bigQuery = require('./lib/bigquery')
const longTermCareFacilities = require('./lib/long-term-care-facilities')
const tweets = require('./lib/tweets')
const annotations = require('./lib/annotations')
const crdtApi = require('./lib/crdt-api')
const crdtAnnotations = require('./lib/crdt-annotations')
const hhs = require('./lib/hhs')
const options = commandLineArgs([
{ name: 'volunteers', alias: 'v', type: Boolean },
{ name: 'screenshots', alias: 's', type: Boolean },
{ name: 'bigquery', alias: 'b', type: Boolean },
{ name: 'ltcfacilities', alias: 'l', type: Boolean },
{ name: 'tweets', alias: 't', type: Boolean },
{ name: 'annotations', alias: 'a', type: Boolean },
{ name: 'hhs', alias: 'h', type: Boolean },
{ name: 'crdtapi', alias: 'c', type: Boolean },
])
const tasks = []
if (options.volunteers) {
tasks.push(volunteers())
}
if (options.screenshots) {
tasks.push(screenshots())
}
if (options.bigquery) {
tasks.push(bigQuery())
}
if (options.ltcfacilities) {
tasks.push(longTermCareFacilities())
}
if (options.tweets) {
tasks.push(tweets())
}
if (options.annotations) {
tasks.push(annotations())
}
if (options.hhs) {
tasks.push(hhs())
}
if (options.crdtapi) {
tasks.push(crdtApi())
tasks.push(crdtAnnotations())
}
Promise.all(tasks).then(() => {
console.log('Done')
})