1919 "recording and produces a summary table "
2020 "(videos.tsv) ."
2121)
22- @click .argument ("path" , type = click .Path (exists = True ))
22+ @click .argument (
23+ "paths" ,
24+ nargs = - 1 , # accept 1 or more arguments
25+ type = click .Path (exists = True , dir_okay = True , file_okay = True ),
26+ )
2327@click .option (
2428 "-m" ,
2529 "--mode" ,
2630 type = click .Choice (["full" , "incremental" , "force" ,
2731 "rerun-for-na" , "reset-to-na" ],
2832 case_sensitive = True ),
2933 default = "incremental" ,
34+ show_default = True ,
3035 help = (
31- """Specifies operation mode, default is 'incremental' :.
36+ """Specifies operation mode:.
3237
3338- [full] : regenerate everything from scratch,
3439
109114)
110115@click .pass_context
111116def video_audit (
112- ctx , path : str , mode : str , output : str ,
117+ ctx , paths : tuple [str , ...],
118+ mode : str , output : str ,
113119 recursive : bool , audit_src ,
114120 max_files : int , path_mask : str ,
115121 verbose : bool
@@ -120,7 +126,7 @@ def video_audit(
120126
121127 logger .debug ("video_audit(...)" )
122128 logger .debug (f"Working dir : { os .getcwd ()} " )
123- logger .info (f"Video full path : { path } " )
129+ logger .info (f"Video full paths : { paths } " )
124130 logger .info (f"Output TSV file : { output } " )
125131 logger .info (f"Recursive scan : { recursive } " )
126132 logger .info (f"Operation mode : { mode } " )
@@ -130,11 +136,12 @@ def video_audit(
130136 logger .info (f"Path mask : { path_mask } " )
131137 logger .info (f"Verbose output : { verbose } " )
132138
133- if not os .path .exists (path ):
134- logger .error (f"Path does not exist: { path } " )
135- return 1
139+ for path in paths :
140+ if not os .path .exists (path ):
141+ logger .error (f"Path does not exist: { path } " )
142+ return 1
136143
137- do_main (path , output , recursive , VaMode (mode ),
144+ do_main (list ( paths ) , output , recursive , VaMode (mode ),
138145 {VaSource (s ) for s in audit_src },
139146 max_files , path_mask , verbose , click .echo )
140147 return 0
0 commit comments