()
| 87 | |
| 88 | |
| 89 | def main(): |
| 90 | parser = argparse.ArgumentParser(prog=sys.argv[0]) |
| 91 | subparsers = parser.add_subparsers(dest='command', help="Commands", required=True) |
| 92 | |
| 93 | remote_parser = subparsers.add_parser("remote", help="Remote-specific commands") |
| 94 | remote_subparsers = remote_parser.add_subparsers(dest='remote_command', help="Remote-specific commands", required=True) |
| 95 | |
| 96 | remote_add_parser = remote_subparsers.add_parser("add", help="Add new Remote") |
| 97 | remote_add_parser.add_argument("name", type=str) |
| 98 | remote_add_parser.add_argument("address", type=str) |
| 99 | |
| 100 | remote_remove_parser = remote_subparsers.add_parser("remove", help="Remove existing Remote") |
| 101 | remote_remove_parser.add_argument("name", type=str) |
| 102 | |
| 103 | remote_list_parser = remote_subparsers.add_parser("list", help="List existing Remotes") |
| 104 | |
| 105 | remote_info_parser = remote_subparsers.add_parser("info", help="Lookup remote information") |
| 106 | remote_info_parser.add_argument("name", type=str) |
| 107 | |
| 108 | project_parser = subparsers.add_parser("project", help="Project-specific commands") |
| 109 | project_subparsers = project_parser.add_subparsers(dest='project_command', help="Project-specific commands", required=True) |
| 110 | |
| 111 | project_create_parser = project_subparsers.add_parser("create", help="Create new Project") |
| 112 | project_create_parser.add_argument("remote", type=str) |
| 113 | project_create_parser.add_argument("name", type=str) |
| 114 | project_create_parser.add_argument("description", type=str) |
| 115 | |
| 116 | project_delete_parser = project_subparsers.add_parser("delete", help="Delete existing Project") |
| 117 | project_delete_parser.add_argument("remote", type=str) |
| 118 | project_delete_parser.add_argument("name", type=str) |
| 119 | |
| 120 | project_list_parser = project_subparsers.add_parser("list", help="List Projects in Remote") |
| 121 | project_list_parser.add_argument("remote", type=str) |
| 122 | |
| 123 | project_info_parser = project_subparsers.add_parser("info", help="Lookup Project information") |
| 124 | project_info_parser.add_argument("remote", type=str) |
| 125 | project_info_parser.add_argument("name", type=str) |
| 126 | |
| 127 | file_parser = subparsers.add_parser("file", help="File-specific commands") |
| 128 | file_subparsers = file_parser.add_subparsers(dest='file_command', help="File-specific commands", required=True) |
| 129 | |
| 130 | file_upload_parser = file_subparsers.add_parser("upload", help="Upload new File") |
| 131 | file_upload_parser.add_argument("remote", type=str) |
| 132 | file_upload_parser.add_argument("project", type=str) |
| 133 | file_upload_parser.add_argument("filepath", type=str) |
| 134 | file_upload_parser.add_argument("description", type=str) |
| 135 | |
| 136 | file_download_parser = file_subparsers.add_parser("download", help="Download existing File") |
| 137 | file_download_parser.add_argument("remote", type=str) |
| 138 | file_download_parser.add_argument("project", type=str) |
| 139 | file_download_parser.add_argument("name", type=str) |
| 140 | |
| 141 | file_delete_parser = file_subparsers.add_parser("delete", help="Delete existing File") |
| 142 | file_delete_parser.add_argument("remote", type=str) |
| 143 | file_delete_parser.add_argument("project", type=str) |
| 144 | file_delete_parser.add_argument("name", type=str) |
| 145 | |
| 146 | file_list_parser = file_subparsers.add_parser("list", help="List Files in Project") |
no test coverage detected