-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More configurable path #70
base: master
Are you sure you want to change the base?
Conversation
`cf clone` is incomplete.
Maybe use |
->
|
Oh. Then I would still prefer something like [
{
"type": "contest",
"path": "%contestID%/%problemID%"
},
{
"type": "gym",
"path": "%contestID%/%problemID%"
},
{
"type": "group",
"path": "group_%groupID%/%contestID%/%problemID%"
},
{
"type": "acmsguru",
"path": "acmsguru/%problemID%"
}
] Just to avoid the inner arrays |
The change is actually pretty intrusive -- with the other code unchanged, it's not possible to configure the problem directory path -- so for example it would not be possible to use |
Note that this change is config-incompatible with the previous commit, so it may be necessary to hand-edit the config file.
Path-based detection is not completely reliable because the user may set patterns arbitrarily.
cf parse
,cf submit
andcf clone
should work fine now. The rest should be unaffected.Should fix #67.
I think the current
cf clone
is incorrect (the directory structure generated cannot be parsed bycf submit
) (not tested)I don't know if there's any part of the code that modifies the other parts of the info. (in that case the path is no longer correct, and it's necessary to store the configuration option in the info object to dynamically compute the path when needed)
%
is used to escape the patterns. To have a%
, enter two percents. Path separator is always slash, even on Windows. The path specifier is listed in decreasing priority.The default-generated configuration is the same as the >=0.9.0 behavior. Pre-0.9.0 behavior can be set by something like this