You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: REFERENCE.rst
+90-18Lines changed: 90 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,8 +41,13 @@ attrib
41
41
42
42
::
43
43
44
+
--inventory PATH Path to an inventory file.
45
+
--mapping Use for mapping between the input keys and the ABOUT field.
46
+
names - mapping.config
47
+
--mapping-file Use a custom mapping file with mapping between input
48
+
keys and ABOUT field names.
44
49
--template PATH Path to a custom attribution template.
45
-
--vartext <key>=<value>Variable text as key=value for use in a custom attribution template.
50
+
--vartext TEXT Variable texts to the attribution template
46
51
--verbose Show all the errors and warning.
47
52
-q, --quiet Do not print any error/warning.
48
53
-h, --help Show this message and exit.
@@ -58,6 +63,7 @@ Assume the following:
58
63
59
64
'/home/about_files/'** contains all the ABOUT files [LOCATION]
60
65
'/home/attribution/attribution.html' is the user's output path [OUTPUT]
66
+
'/home/project/component_list.csv' is the inventory that user want to be generated
61
67
62
68
::
63
69
@@ -68,6 +74,24 @@ Options
68
74
69
75
::
70
76
77
+
--inventory
78
+
79
+
This option allows you to define which ABOUT files should be used for attribution generation.
80
+
For instance,
81
+
'/home/project/component_list.csv' is the inventory that user want to be generated
82
+
83
+
$ about attrib --inventory /home/project/component_list.csv LOCATION OUTPUT
84
+
85
+
--mapping
86
+
87
+
See mapping.config for details
88
+
89
+
--mapping-file
90
+
91
+
Same behavior as `--mapping` but with custom mapping file
92
+
93
+
$ about attrib --mapping-file CUSTOM_MAPPING_FILE_PATH LOCATION OUTPUT
94
+
71
95
--template
72
96
73
97
This option allows you to use your own template for attribution generation.
@@ -151,10 +175,11 @@ gen
151
175
152
176
::
153
177
154
-
--fetch-license api_url api_key Fetch licenses data from DejaCode License
155
-
Library and create <license>.LICENSE
156
-
side-by-side with the generated .ABOUT file.
157
-
The following additional options are required:
178
+
--fetch-license KEY Fetch licenses text from a DejaCode API. and
179
+
create <license>.LICENSE side-by-side
180
+
with the generated .ABOUT file using data
181
+
fetched from a DejaCode License Library. The
182
+
following additional options are required:
158
183
159
184
api_url - URL to the DejaCode License Library
160
185
API endpoint
@@ -163,8 +188,12 @@ gen
163
188
Example syntax:
164
189
165
190
about gen --fetch-license 'api_url' 'api_key'
166
-
--reference PATH Path to a directory with reference license
167
-
data and text files.
191
+
--license-notice-text-location PATH Copy the 'license_file' from the directory to
192
+
the generated location.
193
+
--mapping Use for mapping between the input keys and
194
+
the ABOUT field names - mapping.config
195
+
--mapping-file Use a custom mapping file with mapping between input
196
+
keys and ABOUT field names.
168
197
--verbose Show all the errors and warning.
169
198
-q, --quiet Do not print any error/warning.
170
199
-h, --help Show this message and exit.
@@ -181,29 +210,39 @@ Options
181
210
--fetch-license
182
211
183
212
Fetch licenses text from a DejaCode API. and create <license>.LICENSE side-by-side
184
-
with the generated .ABOUT file using data fetched from the DejaCode License Library.
213
+
with the generated .ABOUT file using data fetched from a DejaCode License Library.
185
214
186
215
This option requires 2 parameters:
187
-
api_url - URL to the DJE License Library.
216
+
api_url - URL to the DJE License Library
188
217
api_key - Hash key to authenticate yourself in the API.
189
218
190
219
In addition, the input needs to have the 'license_expression' field.
191
-
(Please contact nexB to get the api_* value for this feature)
220
+
(Please contact nexB to get the api_* value to use for this feature)
192
221
193
222
$ about gen --fetch-license 'api_url' 'api_key' LOCATION OUTPUT
194
223
195
-
--reference
224
+
--license-notice-text-location
196
225
197
-
Copy the reference files such as 'license_files' and 'notice_files' to the
198
-
generated location from the specified directory.
226
+
Copy the license files and notice files to the generated location based on the
227
+
'license_file' and 'notice_file' value in the input from the directory
199
228
200
229
For instance,
201
-
the specified directory, /home/licenses_notices/, contains all the licenses and notices:
202
-
/home/licenses_notices/apache2.LICENSE
203
-
/home/licenses_notices/jquery.js.NOTICE
230
+
the directory, /home/licenses_notices/, contains all the licenses and notices that you want:
231
+
/home/license/apache2.LICENSE
232
+
/home/license/jquery.js.NOTICE
204
233
205
234
$ about gen --license-notice-text-location /home/licenses_notices/ LOCATION OUTPUT
206
235
236
+
--mapping
237
+
238
+
See mapping.config for details
239
+
240
+
--mapping-file
241
+
242
+
Same behavior as `--mapping` but with custom mapping file
243
+
244
+
$ about attrib --mapping-file CUSTOM_MAPPING_FILE_PATH LOCATION OUTPUT
245
+
207
246
--verbose
208
247
209
248
This option tells the tool to show all errors found.
@@ -226,7 +265,13 @@ inventory
226
265
227
266
::
228
267
268
+
--filter TEXT Filter for the output inventory.
229
269
-f, --format [json|csv] Set OUTPUT file format. [default: csv]
270
+
--mapping Use file mapping.config to collect the defined not supported fields in ABOUT files.
271
+
--mapping-file Use a custom mapping file with mapping between input
272
+
keys and ABOUT field names.
273
+
--mapping-output FILE Use a custom mapping file with mapping between
274
+
ABOUT field names and output keys
230
275
--verbose Show all the errors and warning.
231
276
-q, --quiet Do not print any error/warning.
232
277
-h, --help Show this message and exit.
@@ -240,6 +285,12 @@ Options
240
285
241
286
::
242
287
288
+
-filter TEXT
289
+
290
+
Filter for the output inventory.
291
+
292
+
$ about inventory --filter "license_expression=gpl-2.0" LOCATION OUTPUT
293
+
243
294
The above command will only inventory the ABOUT files which have the "license_expression: gpl-2.0"
244
295
245
296
-f, --format [json|csv]
@@ -248,6 +299,28 @@ Options
248
299
249
300
$ about inventory -f json LOCATION OUTPUT
250
301
302
+
--mapping
303
+
304
+
See mapping.config for details
305
+
306
+
--mapping-file
307
+
308
+
Same behavior as `--mapping` but with custom mapping file
309
+
310
+
$ about inventory --mapping-file CUSTOM_MAPPING_FILE_PATH LOCATION OUTPUT
311
+
312
+
--mapping-output
313
+
314
+
Same behavior as `--mapping-file` but with custom mapping file
315
+
In the custom mapping file, the left side is the custom key name where
316
+
the right side is the ABOUT field name. For instance,
317
+
Component: name
318
+
319
+
The "Component" is a custom field name for the output
320
+
The "name" is one of the defaul ABOUT field name that user want to convert
321
+
322
+
$ about inventory --mapping-output CUSTOM_MAPPING_FILE_PATH LOCATION OUTPUT
323
+
251
324
--verbose
252
325
253
326
This option tells the tool to show all errors found.
@@ -335,5 +408,4 @@ Options
335
408
336
409
Special Notes
337
410
=============
338
-
When using the `column_filters` configuration, all the standard required columns
339
-
(`about_resource` and `name`) and the user defined `required_columns` need to be included.
411
+
When using the `column_filters` configuration, all the standard required columns (`about_resource` and `name`) and the user definied `required_columns` need to be included.
0 commit comments