-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcli.js
40 lines (28 loc) · 1.43 KB
/
cli.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
import { Command } from 'commander';
import * as actions from './lib/actions.js';
const program = new Command();
program
.name('blueprint-ui-config-initializer')
.description('Initializer for Zazuko Blueprint UI configuration');
program.command('fetch-classes')
.description('Fetch candidate classes from SPARQL_ENDPOINT')
.option('--output <filename>', 'output filename', '_classes.ttl')
.action(actions.fetchClasses);
program.command('fetch-links')
.description('Fetch candidate links between given classes from SPARQL_ENDPOINT')
.option('--classes <filename>', 'classes filename', 'classes.ttl')
.option('--output <filename>', 'output filename', '_links.ttl')
.action(actions.fetchLinks);
program.command('fetch-details')
.description('Fetch candidate details for given classes from SPARQL_ENDPOINT')
.option('--classes <filename>', 'classes filename', 'classes.ttl')
.option('--output <filename>', 'output filename', '_details.ttl')
.action(actions.fetchDetails);
program.command('generate-config')
.description('Generate Blueprint UI configuration from given classes, links and details')
.option('--classes <filename>', 'classes filename', 'classes.ttl')
.option('--links <filename>', 'links filename', 'links.ttl')
.option('--details <filename>', 'details filename', 'details.ttl')
.option('--output <filename>', 'output filename', '_blueprint-ui-config.ttl')
.action(actions.generateConfig);
program.parseAsync();