@@ -96,16 +96,18 @@ def new_contest():
96
96
fatal ("--problem does not work for new_contest." )
97
97
98
98
# Ask for all required infos.
99
- title = _ask_variable_string ("name" , config .args .contestname )
99
+ title = _ask_variable_string ("name" , config .args .contestname ). replace ( "_" , "-" )
100
100
subtitle = _ask_variable_string ("subtitle" , "" , True ).replace ("_" , "-" )
101
101
dirname = _ask_variable_string ("dirname" , _alpha_num (title ))
102
- author = _ask_variable_string ("author" , f"The { title } jury " ).replace ("_" , "-" )
102
+ author = _ask_variable_string ("author" , f"The { title } Jury " ).replace ("_" , "-" )
103
103
testsession = _ask_variable_bool ("testsession" , False )
104
104
year = _ask_variable_string ("year" , str (datetime .datetime .now ().year ))
105
105
source_url = _ask_variable_string ("source url" , "" , True )
106
106
license = _ask_variable_choice ("license" , config .KNOWN_LICENSES )
107
- rights_owner = _ask_variable_string ("rights owner" , "author" )
108
- title = title .replace ("_" , "-" )
107
+ rights_owner = _ask_variable_string (
108
+ "rights owner (if left empty, defaults to problem author)" , "" , allow_empty = True
109
+ )
110
+ rights_owner = f"rights_owner: { rights_owner } \n " if rights_owner else ""
109
111
110
112
skeldir = config .TOOLS_ROOT / "skel/contest"
111
113
log (f"Copying { skeldir } to { dirname } ." )
@@ -198,7 +200,12 @@ def new_problem():
198
200
"license" , config .KNOWN_LICENSES , variables .get ("license" , None )
199
201
)
200
202
variables ["rights_owner" ] = _ask_variable_string (
201
- "rights owner" , variables .get ("rights_owner" , "author" )
203
+ f"rights owner{ '' if variables .get ('rights_owner' , '' ) else ' (if left empty, defaults to problem author)' } " ,
204
+ variables .get ("rights_owner" , "" ),
205
+ allow_empty = True ,
206
+ )
207
+ variables ["rights_owner" ] = (
208
+ f"rights_owner: { variables ['rights_owner' ]} \n " if variables ["rights_owner" ] else ""
202
209
)
203
210
variables ["uuid" ] = generate_problem_uuid ()
204
211
0 commit comments