-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.pl
73 lines (65 loc) · 1.6 KB
/
run.pl
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
61
62
63
64
65
66
67
68
69
70
71
72
% Standalone startup file for the LOD Laundromat endpoint.
% Load modules.
:- if(current_prolog_flag(argv, ['--debug'])).
:- ensure_loaded(debug).
:- else.
:- ensure_loaded(load).
:- endif.
:- use_module(plc(server/app_server)).
:- initialization(init).
init:-
absolute_file_name(data(.), DefaultDir, [file_type(directory)]),
OptSpec= [
[
default(false),
help('Whether debug messages are displayed or not.'),
longflags([debug]),
opt(debug),
type(boolean)
],
[
default(DefaultDir),
help('The directory where the cleaned data is stored.'),
longflags([dir,directory]),
opt(directory),
type(atom)
],
[
default(virtuoso),
help('The endpoint that is used to store the LOD Washing Machine \c
metadata.'),
longflags([endpoint]),
opt(endpoint),
shortflags([e]),
type(atom)
],
[
default(false),
help('Enumerate the supported command-line options.'),
longflags([help]),
opt(help),
shortflags([h]),
type(boolean)
],
[
default(3040),
help('The port at which the triple store for the scrape metadata \c
can be reached.'),
longflags([port]),
opt(port),
shortflags([p]),
type(integer)
]
],
opt_arguments(OptSpec, Options, _),
% Process help.
( option(help(true), Options)
-> opt_help(OptSpec, Help),
format(user_output, '~a\n', [Help]),
halt
; init(Options)
).
init(Options):-
option(port(Port), Options),
init_lle_settings(Port),
start_app_server([port(Port)]).