-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelptext.ts
281 lines (185 loc) · 5.95 KB
/
helptext.ts
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
export function fmtHelp(
txt: string,
appName: string,
version: string,
releaseDate: string,
releaseHash: string,
): string {
return txt.replaceAll("{app_name}", appName)
.replaceAll("{version}", version)
.replaceAll("{release_date}", releaseDate)
.replaceAll("{release_hash}", releaseHash);
}
export const coldHelpText =
`%{app_name}(1) user manual | {version} {release_hash}
% R. S.Doiel
% {release_date}
# NAME
{app_name}
# SYNOPSIS
{app_name} [OPTIONS]
# DESCRIPTION
{app_name} provides the admin interface for {app_name}. Cold is implemented using dataset collections
for object persistence and relies on datasetd for JSON API to each collection.
# OPTIONS
help
: display help
license
: display license
version
: display version
debug
: turn on debug logging
port
: set the port number, default 8111
htdocs
: set the static content directory, default ./htdocs
baseUrl
: set the browser's base path reference, default ://
apiUrl
: set the url to the datasetd API provided for {app_name}
# EXAMPLE
{app_name} is setup to run at <http://localhost:8111>. The static content hosted in
the "/var/www/html/{app_name}/app" directory. The datasetd service is setup to run at
<http://localhost:8112> supporting the people, groups and vocabularies dataset
collections.
~~~shell
{app_name} -port=8111 -htdocs=/var/www/html/{app_name}/app \\
-apiUrl=http://localhost:8112
~~~
`;
export const coldReportsHelpText =
`%{app_name}(1) user manual | {version} {release_hash}
% R. S.Doiel
% {release_date}
# NAME
{app_name}
# SYNOPSIS
{app_name} [OPTIONS] [REPORTS_YAML]
# DESCRIPTION
{app_name} processes the report request queue. {app_name} is expected to validate
the report request, launch the report. The report is responsible to writing it's output
to standard out which is read by the {app_name}. {app_name} then renders the report
to a known location and updates the link data in the report request record.
REPORTS_YAML is the filename to read for configuring which reports are allowed to run and
what programs are executed as a result. If it is not provided then "{app_name}.yaml" is looked
for in the current working directory.
{app_name} requires access to the COLD JSON API to manage report requests.
Two example reports are provided in the COLD repository. Both are written in Bash and
require that dataset's dsquery program are available. The provided report examples
are "run_people_csv.bash" and "run_groups_csv.bash".
Reports can be written in any language supported by the host system or can be
compiled programs. The primary requirement is that they write their results to standard
out so that the report runner can manage making the reports available via the COLD web app.
{app_name} is designed as daemon suitable to run under systemd or other service management
system. Logging is written to standard output. Included in the COLD repository is an example
service file to use when deploying {app_name}.
# OPTIONS
help
: display help
license
: display license
version
: display version
debug
: turn on debug logging
# EXAMPLE
Shown is starting {app_name} with an explicit configuration file, "my_{app_name}.yaml" file, then
run with the default configuration file, "{app_name}.yaml" in the same working directory.
~~~shell
{app_name} my_{app_name}.yaml
{app_name}
~~~
`;
export const directorySyncHelpText =
`%{app_name}(1) user manual | {version} {release_hash}
% R. S.Doiel
% {release_date}
# NAME
{app_name}
# SYNOPSIS
{app_name} [OPTIONS]
# DESCRIPTION
{app_name} synchronizes the content between Caltech Directory and CaltechPEOPLE.
It uses the COLD Admin API as well as the Caltech Directory website content as a
data source.
Assuming COLD Admin is running on it's standard ports no configuration is needed.
{app_name} is suitable to run from a cronjob on the same machine which hosts COLD.
# OPTIONS
help
: display help
license
: display license
version
: display version
debug
: turn on debug logging
port
: set the port number for the COLD Admin JSON API, default 8112
directory
: set the Caltech Directory URL, default https://directory.caltech.edu
# EXAMPLE
{app_name} is setup to contact https://directory.caltech.edu to harvest directory content.
~~~shell
{app_name}
~~~
`;
export const journalVocabularyHelpText =
`%{app_name}(1) user manual | {version} {release_hash}
% R. S.Doiel
% {release_date}
# NAME
{app_name}
# SYNOPSIS
{app_name} [OPTIONS]
# DESCRIPTION
{app_name} generates an RDM Vocabulary for Journals based on
the ISSN data held in the dataset collection called "issn.ds".
The dataset collection must be in the same directory where you
run {app_name}. It must have the "issn_names" query defined
for the dataset collection in the "cold_api.yaml" file. The
cold JSON API must be running for {app_name} to work.
If all goes well {app_name} should exist with a zero status code.
# OPTION
-h, --help
: display this help page
-l, --license
: display the license information
-v, --version
: display version number
# EXAMPLE
Aside from being in the same directory as "issn.ds" {app_name}
will do the rest.
~~~shell
{app_name}
~~~
`;
export const groupVocabularyHelpText =
`%{app_name}(1) user manual | {version} {release_hash}
% R. S.Doiel
% {release_date}
# NAME
{app_name}
# SYNOPSIS
{app_name} [OPTIONS]
# DESCRIPTION
{app_name} generates an RDM Vocabulary for Groups based on
the dataset collection called "groups.ds".
The dataset collection must be in the same directory where you
run {app_name}. It must have the "group_names" query defined
in the "cold_api.yaml" file and the "cold_api" service running.
If all goes well {app_name} should exist with a zero status code.
# OPTION
-h, --help
: display this help page
-l, --license
: display the license information
-v, --version
: display version number
# EXAMPLE
Aside from being in the same directory as "groups.ds" {app_name}
will do the rest.
~~~shell
{app_name}
~~~
`;