@@ -171,9 +171,9 @@ def validate_extensions(ctx, param, value, extensions=tuple(('.csv', '.json',)))
171171
172172def inventory (location , output , format , quiet , verbose ): # NOQA
173173 """
174- Collect the inventory of . ABOUT file data as CSV or JSON.
174+ Collect the inventory of ABOUT file data as CSV or JSON.
175175
176- LOCATION: Path to an . ABOUT file or a directory with . ABOUT files.
176+ LOCATION: Path to an ABOUT file or a directory with ABOUT files.
177177
178178OUTPUT: Path to the JSON or CSV inventory file to create.
179179 """
@@ -243,7 +243,7 @@ def inventory(location, output, format, quiet, verbose): # NOQA
243243
244244def gen (location , output , android , fetch_license , reference , quiet , verbose ):
245245 """
246- Generate .ABOUT files in OUTPUT from an inventory of . ABOUT files at LOCATION .
246+ Given a CSV/JSON inventory, generate ABOUT files in the output location .
247247
248248LOCATION: Path to a JSON or CSV inventory file.
249249
@@ -415,7 +415,7 @@ def attrib(location, output, template, vartext, quiet, verbose):
415415
416416def collect_redist_src (location , output , from_inventory , with_structures , zip , quiet , verbose ):
417417 """
418- Collect sources that have 'redistribute' flagged in .ABOUT files or inventory
418+ Collect sources that have 'redistribute' flagged as 'True' in .ABOUT files or inventory
419419to the output location.
420420
421421LOCATION: Path to a directory containing sources that need to be copied
@@ -442,7 +442,7 @@ def collect_redist_src(location, output, from_inventory, with_structures, zip, q
442442 errors , abouts = collect_inventory (location )
443443
444444 if zip :
445- # Copy to a temp location and the zip to the ouput location
445+ # Copy to a temp location and the zip to the output location
446446 output_location = get_temp_dir ()
447447 else :
448448 output_location = output
@@ -452,7 +452,10 @@ def collect_redist_src(location, output, from_inventory, with_structures, zip, q
452452
453453 if zip :
454454 import shutil
455- shutil .make_archive (output , 'zip' , output_location )
455+ # Stripped the .zip extension as the `shutil.make_archive` will
456+ # append the .zip extension
457+ output_no_extension = output .rsplit ('.' , 1 )[0 ]
458+ shutil .make_archive (output_no_extension , 'zip' , output_location )
456459
457460 errors .extend (copy_list_errors )
458461 errors .extend (copy_errors )
@@ -489,7 +492,7 @@ def check(location, verbose):
489492 """
490493Check .ABOUT file(s) at LOCATION for validity and print error messages.
491494
492- LOCATION: Path to a file or directory containing . ABOUT files.
495+ LOCATION: Path to an ABOUT file or a directory with ABOUT files.
493496 """
494497 print_version ()
495498 click .echo ('Checking ABOUT files...' )
@@ -550,7 +553,8 @@ def print_config_help(ctx, param, value):
550553def transform (location , output , configuration , quiet , verbose ): # NOQA
551554 """
552555Transform the CSV/JSON file at LOCATION by applying renamings, filters and checks
553- and write a new CSV/JSON to OUTPUT.
556+ and then write a new CSV/JSON to OUTPUT (Format for input and output need to be
557+ the same).
554558
555559LOCATION: Path to a CSV/JSON file.
556560
0 commit comments