Skip to content

Commit df6bd28

Browse files
committed
Fixed #387
* Update REFERENCE.rst to sync with the current code.
1 parent 21ee34b commit df6bd28

File tree

5 files changed

+22
-93
lines changed

5 files changed

+22
-93
lines changed

REFERENCE.rst

Lines changed: 18 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,8 @@ attrib
4141

4242
::
4343

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.
4944
--template PATH Path to a custom attribution template.
50-
--vartext TEXT Variable texts to the attribution template
45+
--vartext <key>=<value> Variable text as key=value for use in a custom attribution template.
5146
--verbose Show all the errors and warning.
5247
-q, --quiet Do not print any error/warning.
5348
-h, --help Show this message and exit.
@@ -63,7 +58,6 @@ Assume the following:
6358

6459
'/home/about_files/'** contains all the ABOUT files [LOCATION]
6560
'/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
6761

6862
::
6963

@@ -74,24 +68,6 @@ Options
7468

7569
::
7670

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-
9571
--template
9672

9773
This option allows you to use your own template for attribution generation.
@@ -175,11 +151,10 @@ gen
175151

176152
::
177153

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:
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:
183158

184159
api_url - URL to the DejaCode License Library
185160
API endpoint
@@ -188,12 +163,8 @@ gen
188163
Example syntax:
189164

190165
about gen --fetch-license 'api_url' 'api_key'
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.
166+
--reference PATH Path to a directory with reference license
167+
data and text files.
197168
--verbose Show all the errors and warning.
198169
-q, --quiet Do not print any error/warning.
199170
-h, --help Show this message and exit.
@@ -210,39 +181,29 @@ Options
210181
--fetch-license
211182

212183
Fetch licenses text from a DejaCode API. and create <license>.LICENSE side-by-side
213-
with the generated .ABOUT file using data fetched from a DejaCode License Library.
184+
with the generated .ABOUT file using data fetched from the DejaCode License Library.
214185

215186
This option requires 2 parameters:
216-
api_url - URL to the DJE License Library
187+
api_url - URL to the DJE License Library.
217188
api_key - Hash key to authenticate yourself in the API.
218189

219190
In addition, the input needs to have the 'license_expression' field.
220-
(Please contact nexB to get the api_* value to use for this feature)
191+
(Please contact nexB to get the api_* value for this feature)
221192

222193
$ about gen --fetch-license 'api_url' 'api_key' LOCATION OUTPUT
223194

224-
--license-notice-text-location
195+
--reference
225196

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
197+
Copy the reference files such as 'license_files' and 'notice_files' to the
198+
generated location from the specified directory.
228199

229200
For instance,
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
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
233204

234205
$ about gen --license-notice-text-location /home/licenses_notices/ LOCATION OUTPUT
235206

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-
246207
--verbose
247208

248209
This option tells the tool to show all errors found.
@@ -265,13 +226,7 @@ inventory
265226

266227
::
267228

268-
--filter TEXT Filter for the output inventory.
269229
-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
275230
--verbose Show all the errors and warning.
276231
-q, --quiet Do not print any error/warning.
277232
-h, --help Show this message and exit.
@@ -285,12 +240,6 @@ Options
285240

286241
::
287242

288-
-filter TEXT
289-
290-
Filter for the output inventory.
291-
292-
$ about inventory --filter "license_expression=gpl-2.0" LOCATION OUTPUT
293-
294243
The above command will only inventory the ABOUT files which have the "license_expression: gpl-2.0"
295244

296245
-f, --format [json|csv]
@@ -299,28 +248,6 @@ Options
299248

300249
$ about inventory -f json LOCATION OUTPUT
301250

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-
324251
--verbose
325252

326253
This option tells the tool to show all errors found.
@@ -408,4 +335,5 @@ Options
408335

409336
Special Notes
410337
=============
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.
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.

about.ABOUT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
about_resource: .
22
name: AboutCode-toolkit
3-
version: 4.0.0
3+
version: 4.0.1
44
author: Jillian Daguil, Chin Yeung Li, Philippe Ombredanne, Thomas Druez
55
copyright: Copyright (c) 2013-2019 nexB Inc.
66
description: |-

docs/CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Release 4.0.1
33

44
* Declare to follow SemVer for versioning schema
5+
* Update REFERENCE.rst
56

67

78
2019-10-09

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def read(*names, **kwargs):
2424

2525
setup(
2626
name='aboutcode-toolkit',
27-
version='4.0.0',
27+
version='4.0.1',
2828
license='Apache-2.0',
2929
description=(
3030
'AboutCode-toolkit is a tool to document the provenance (origin and license) of '

src/attributecode/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
import saneyaml
3333

34-
__version__ = '4.0.0'
34+
__version__ = '4.0.1'
3535

3636
__about_spec_version__ = '3.1.4'
3737

0 commit comments

Comments
 (0)