dlc2action.scripts.init
1# 2# Copyright 2020-present by A. Mathis Group and contributors. All rights reserved. 3# 4# This project and all its files are licensed under GNU AGPLv3 or later version. 5# A copy is included in dlc2action/LICENSE.AGPL. 6# 7import click 8from dlc2action.project import Project 9 10 11@click.option("--name", "-n", required=True, type=str, help="name of the project") 12@click.option("--data_type", "-d", required=True, type=str, help="data type") 13@click.option( 14 "--data_path", 15 "-dp", 16 required=True, 17 type=str, 18 help="path to the folder containing " "input files for the project", 19 multiple=True, 20) 21@click.option( 22 "--annotation_path", 23 "-ap", 24 required=True, 25 type=str, 26 help="path to the folder containing " "annotation files for the project", 27 multiple=True, 28) 29@click.option( 30 "--annotation_type", 31 "-a", 32 required=False, 33 default="none", 34 type=str, 35 help="annotation type", 36) 37@click.option( 38 "--projects_path", 39 "-pp", 40 required=False, 41 type=str, 42 help="path to the projects folder " "(is filled with ~/DLC2Action by default)", 43) 44@click.option( 45 "--copy", 46 is_flag=True, 47 help="if the flag is used, the files from annotation_path and data_path will be " 48 "copied to the projects folder", 49) 50@click.command() 51def main( 52 name, data_type, annotation_type, projects_path, data_path, annotation_path, copy 53): 54 """ 55 Start a new project 56 """ 57 58 Project( 59 name, 60 data_type, 61 annotation_type, 62 projects_path, 63 data_path, 64 annotation_path, 65 copy, 66 ) 67 68 69if __name__ == "__main__": 70 main()
main =
<Command main>
Start a new project