@@ -130,13 +130,16 @@ def generate_details(output_path, environment, licenses, test=False):
130
130
131
131
``test`` is to generate a stable output for testing only
132
132
"""
133
+ from licensedcode .cache import get_cache
134
+ include_builtin = get_cache ().has_additional_licenses
135
+
133
136
if test :
134
137
base_context_mapping = base_context_test
135
138
else :
136
139
base_context_mapping = base_context
137
140
license_details_template = environment .get_template ("license_details.html" )
138
141
for lic in licenses .values ():
139
- license_data = lic .to_dict (include_text = False , include_builtin = False )
142
+ license_data = lic .to_dict (include_text = False , include_builtin = include_builtin )
140
143
html = license_details_template .render (
141
144
** base_context_mapping ,
142
145
license = lic ,
@@ -206,7 +209,7 @@ def generate(
206
209
207
210
def scancode_license_data (path ):
208
211
"""
209
- Dump license data from scancode licenses to the directory ``value `` passed
212
+ Dump license data from scancode licenses to the directory ``path `` passed
210
213
in from command line.
211
214
212
215
Dumps data in JSON, YAML and HTML formats and also dumps the .LICENSE file
@@ -220,7 +223,7 @@ def scancode_license_data(path):
220
223
@click .command (name = 'scancode-license-data' )
221
224
@click .option (
222
225
'--path' ,
223
- type = click .Path (exists = False , readable = True , file_okay = False , resolve_path = True , path_type = str ),
226
+ type = click .Path (exists = False , writable = True , file_okay = False , resolve_path = True , path_type = str ),
224
227
metavar = 'DIR' ,
225
228
help = 'Dump the license data in this directory in the LicenseDB format and exit. '
226
229
'Creates the directory if it does not exist. ' ,
@@ -233,7 +236,9 @@ def dump_scancode_license_data(
233
236
* args ,
234
237
** kwargs ,
235
238
):
236
- """Reindex scancode licenses and exit"""
239
+ """
240
+ Dump scancode license data in various formats, and the licenseDB static website at `path`.
241
+ """
237
242
scancode_license_data (path = path )
238
243
239
244
0 commit comments