@@ -130,13 +130,16 @@ def generate_details(output_path, environment, licenses, test=False):
130130
131131 ``test`` is to generate a stable output for testing only
132132 """
133+ from licensedcode .cache import get_cache
134+ include_builtin = get_cache ().has_additional_licenses
135+
133136 if test :
134137 base_context_mapping = base_context_test
135138 else :
136139 base_context_mapping = base_context
137140 license_details_template = environment .get_template ("license_details.html" )
138141 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 )
140143 html = license_details_template .render (
141144 ** base_context_mapping ,
142145 license = lic ,
@@ -206,7 +209,7 @@ def generate(
206209
207210def scancode_license_data (path ):
208211 """
209- Dump license data from scancode licenses to the directory ``value `` passed
212+ Dump license data from scancode licenses to the directory ``path `` passed
210213 in from command line.
211214
212215 Dumps data in JSON, YAML and HTML formats and also dumps the .LICENSE file
@@ -220,7 +223,7 @@ def scancode_license_data(path):
220223@click .command (name = 'scancode-license-data' )
221224@click .option (
222225 '--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 ),
224227 metavar = 'DIR' ,
225228 help = 'Dump the license data in this directory in the LicenseDB format and exit. '
226229 'Creates the directory if it does not exist. ' ,
@@ -233,7 +236,9 @@ def dump_scancode_license_data(
233236 * args ,
234237 ** kwargs ,
235238):
236- """Reindex scancode licenses and exit"""
239+ """
240+ Dump scancode license data in various formats, and the licenseDB static website at `path`.
241+ """
237242 scancode_license_data (path = path )
238243
239244
0 commit comments