Skip to content

Commit 9f1f925

Browse files
authored
Merge pull request #35 from github/elr/cmd-doc
add documentation for license extraction utility
2 parents 9edaf20 + ad924b9 commit 9f1f925

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

cmd/doc.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
Extracts license, deprecation, and exception ids from the official spdx license list data.
3+
The source data needs to be manually updated by copying the licenses.json file from
4+
https://github.com/spdx/license-list-data/blob/main/json/licenses.json and exceptions.json
5+
file from https://github.com/spdx/license-list-data/blob/main/json/exceptions.json.
6+
7+
After running the extract command, the license_ids.json, deprecated_ids.json, and exception_ids.json
8+
files will be overwritten with the extracted ids. These license ids can then be used to update the
9+
spdxexp/license.go file.
10+
11+
Command to run all extractions (run command from the /cmd directory):
12+
13+
go run . extract -l -e
14+
15+
Usage options:
16+
17+
-h: prints this help message
18+
-l: Extract license ids
19+
-e: Extract exception ids
20+
*/
21+
package main

0 commit comments

Comments
 (0)