You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Made several improvements to onboard_project
-Can now onboard multiple projects
- --copy-from now will use the user's Downloads folder if included with no value
-clean_project changed from silnlp.scripts.clean_project to silnlp.common.clean_projects so multiple projects can be cleaned at once and more unncessary files are removed
-Added a wildebeest section to the config, and default args for wildebeest analysis
-Added a zip_password section to the config for encrypted zip files
from .collect_verse_countsimportcollect_verse_counts
15
16
from .environmentimportSIL_NLP_ENV
@@ -115,21 +116,24 @@ def main() -> None:
115
116
)
116
117
117
118
parser.add_argument(
118
-
"project",
119
+
"projects",
119
120
help="Paratext project name. The project will be stored on the bucket at Paratext/projects/<project>.",
120
-
type=str,
121
+
nargs="*",
122
+
default=None,
121
123
)
122
124
parser.add_argument(
123
125
"--copy-from",
124
-
help="Path to a downloaded Paratext project folder. The local project will be copied to the bucket.",
126
+
help="Path to a downloaded Paratext project folder. The local project will be copied to the bucket. If provided without a value, uses the user's Downloads directory.",
127
+
nargs="?",
128
+
const=Path.home() /"Downloads",
125
129
default=None,
126
-
type=str,
130
+
type=Path,
127
131
)
128
132
parser.add_argument(
129
133
"--config",
130
134
help="Path to a configuration file in YAML format. This is used to configure the onboarding process.",
131
135
default=None,
132
-
type=str,
136
+
type=Path,
133
137
)
134
138
parser.add_argument(
135
139
"--overwrite", help="Overwrite any existing files and folders", default=False, action="store_true"
@@ -152,7 +156,7 @@ def main() -> None:
152
156
"--clean-project",
153
157
default=False,
154
158
action="store_true",
155
-
help="Cleans the Paratext project folder by removing unnecessary files and folders.",
159
+
help="Cleans the Paratext project folder by removing unnecessary files and folders before copying. Only used if --copy-from is provided.",
156
160
)
157
161
parser.add_argument(
158
162
"--timestamp",
@@ -165,78 +169,102 @@ def main() -> None:
165
169
)
166
170
167
171
args=parser.parse_args()
168
-
ifnotargs.project:
172
+
ifnotargs.projects:
169
173
raiseValueError("Project name is required. Please provide a valid Paratext project name using <project>.")
0 commit comments