Skip to content

Commit 04f383b

Browse files
committed
Revert back the master with previous version.
* The fixes should takes place in the `develop` branch first
1 parent df6bd28 commit 04f383b

File tree

5 files changed

+93
-22
lines changed

5 files changed

+93
-22
lines changed

REFERENCE.rst

Lines changed: 90 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,13 @@ 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.
4449
--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
4651
--verbose Show all the errors and warning.
4752
-q, --quiet Do not print any error/warning.
4853
-h, --help Show this message and exit.
@@ -58,6 +63,7 @@ Assume the following:
5863

5964
'/home/about_files/'** contains all the ABOUT files [LOCATION]
6065
'/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
6167

6268
::
6369

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

6975
::
7076

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+
7195
--template
7296

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

152176
::
153177

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

159184
api_url - URL to the DejaCode License Library
160185
API endpoint
@@ -163,8 +188,12 @@ gen
163188
Example syntax:
164189

165190
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.
168197
--verbose Show all the errors and warning.
169198
-q, --quiet Do not print any error/warning.
170199
-h, --help Show this message and exit.
@@ -181,29 +210,39 @@ Options
181210
--fetch-license
182211

183212
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.
185214

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

190219
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)
192221

193222
$ about gen --fetch-license 'api_url' 'api_key' LOCATION OUTPUT
194223

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

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
199228

200229
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
204233

205234
$ about gen --license-notice-text-location /home/licenses_notices/ LOCATION OUTPUT
206235

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+
207246
--verbose
208247

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

227266
::
228267

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

241286
::
242287

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

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

249300
$ about inventory -f json LOCATION OUTPUT
250301

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+
251324
--verbose
252325

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

336409
Special Notes
337410
=============
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.

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.1
3+
version: 4.0.0
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: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Release 4.0.1
33

44
* Declare to follow SemVer for versioning schema
5-
* Update REFERENCE.rst
65

76

87
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.1',
27+
version='4.0.0',
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.1'
34+
__version__ = '4.0.0'
3535

3636
__about_spec_version__ = '3.1.4'
3737

0 commit comments

Comments
 (0)