@@ -207,9 +207,9 @@ def check_lang(lang: str):
207
207
return lang
208
208
209
209
210
- PRIMARY_DEFAULT_CONFIG_PATH = os .path .join (
210
+ USER_CONFIG_PATH = os .path .join (
211
211
expanduser ("~" ), ".atcodertools.toml" )
212
- SECONDARY_DEFAULT_CONFIG_PATH = os .path .abspath (
212
+ DEFAULT_CONFIG_PATH = os .path .abspath (
213
213
os .path .join (script_dir_path , "./atcodertools-default.toml" ))
214
214
215
215
@@ -222,10 +222,10 @@ def _load(path: str):
222
222
if config_path :
223
223
return _load (config_path )
224
224
225
- if os .path .exists (PRIMARY_DEFAULT_CONFIG_PATH ):
226
- return _load (PRIMARY_DEFAULT_CONFIG_PATH )
225
+ if os .path .exists (USER_CONFIG_PATH ):
226
+ return _load (USER_CONFIG_PATH )
227
227
228
- return _load (SECONDARY_DEFAULT_CONFIG_PATH )
228
+ return _load (DEFAULT_CONFIG_PATH )
229
229
230
230
231
231
def main (prog , args ):
@@ -234,35 +234,34 @@ def main(prog, args):
234
234
formatter_class = argparse .RawTextHelpFormatter )
235
235
236
236
parser .add_argument ("contest_id" ,
237
- help = "contest ID (e.g. arc001)" )
237
+ help = "Contest ID (e.g. arc001)" )
238
238
239
239
parser .add_argument ("--without-login" ,
240
240
action = "store_true" ,
241
- help = "download data without login" )
241
+ help = "Download data without login" )
242
242
243
243
parser .add_argument ("--workspace" ,
244
- help = "path to workspace's root directory. This script will create files"
244
+ help = "Path to workspace's root directory. This script will create files"
245
245
" in {{WORKSPACE}}/{{contest_name}}/{{alphabet}}/ e.g. ./your-workspace/arc001/A/\n "
246
246
"[Default] {}" .format (DEFAULT_WORKSPACE_DIR_PATH ),
247
247
default = DEFAULT_WORKSPACE_DIR_PATH )
248
248
249
249
parser .add_argument ("--lang" ,
250
- help = "programming language of your template code, {}.\n "
250
+ help = "Programming language of your template code, {}.\n "
251
251
.format (" or " .join (SUPPORTED_LANGUAGES )) + "[Default] {}" .format (DEFAULT_LANG ),
252
252
default = DEFAULT_LANG ,
253
253
type = check_lang )
254
254
255
255
parser .add_argument ("--template" ,
256
- help = "{0}{1}" . format ( "file path to your template code\n "
257
- "[Default (C++)] {}\n " .format (
258
- get_default_template_path ('cpp' )),
259
- "[Default (Java)] {}" .format (
260
- get_default_template_path ('java' )))
256
+ help = "File path to your template code\n {0}{1}" . format (
257
+ "[Default (C++)] {}\n " .format (
258
+ get_default_template_path ('cpp' )),
259
+ "[Default (Java)] {}" .format (
260
+ get_default_template_path ('java' )))
261
261
)
262
262
263
263
parser .add_argument ("--replacement" ,
264
- help = "{0}{1}" .format (
265
- "file path to the replacement code created when template generation is failed.\n "
264
+ help = "File path to your config file\n {0}{1}" .format (
266
265
"[Default (C++)] {}\n " .format (get_default_replacement_path ('cpp' )),
267
266
"[Default (Java)] {}" .format (
268
267
get_default_replacement_path ('java' )))
@@ -279,11 +278,10 @@ def main(prog, args):
279
278
default = False )
280
279
281
280
parser .add_argument ("--config" ,
282
- help = "{0}{1}{2}" .format ("file path to your config file\n " ,
283
- "[Default (Primary)] {}\n " .format (
284
- PRIMARY_DEFAULT_CONFIG_PATH ),
285
- "[Default (Secondary)] {}\n " .format (
286
- SECONDARY_DEFAULT_CONFIG_PATH ))
281
+ help = "File path to your config file\n {0}{1}" .format ("[Default (Primary)] {}\n " .format (
282
+ USER_CONFIG_PATH ),
283
+ "[Default (Secondary)] {}\n " .format (
284
+ DEFAULT_CONFIG_PATH ))
287
285
)
288
286
289
287
args = parser .parse_args (args )
0 commit comments