@@ -62,6 +62,8 @@ def main():
6262 create_folder (command , further_args )
6363 elif command == "upload-images" :
6464 image_upload (command , further_args )
65+ elif command == "attach-image-urls" :
66+ attach_image_urls (command , further_args )
6567 elif command == "upload-videos" :
6668 video_upload (command , further_args )
6769 elif command in ["upload-preannotations" , "upload-annotations" ]:
@@ -288,6 +290,31 @@ def image_upload(command_name, args):
288290 )
289291
290292
293+ def attach_image_urls (command_name , args ):
294+ parser = argparse .ArgumentParser (prog = _CLI_COMMAND + " " + command_name )
295+ parser .add_argument (
296+ '--project' , required = True , help = 'Project name to upload'
297+ )
298+ parser .add_argument (
299+ '--attachments' ,
300+ required = True ,
301+ help = 'path to csv file on attachments metadata'
302+ )
303+ parser .add_argument (
304+ '--annotation_status' ,
305+ required = False ,
306+ default = "NotStarted" ,
307+ help =
308+ 'Set images\' annotation statuses after upload. Default is NotStarted'
309+ )
310+ args = parser .parse_args (args )
311+ sa .attach_image_urls_to_project (
312+ project = args .project ,
313+ attachments = args .attachments ,
314+ annotation_status = args .annotation_status
315+ )
316+
317+
291318def export_project (command_name , args ):
292319 parser = argparse .ArgumentParser (prog = _CLI_COMMAND + " " + command_name )
293320 parser .add_argument (
0 commit comments