Closed vexorian closed 10 years ago
Awesome! You read my mind! I was considering this feature too.
I do think a config like contestDirectory
is needed, to set a root for an individual contest, which make perfect sense.
But what I'm really considering is this, if we have contestDirectory
, do we really need the codeRoot
?
I don't see any necessity. If we have, it's just ${codeRoot}/${ContestDir}
instead of ${contestDir}
, seems useless and redundant.
Oh, I see a little difference. What I mean was that we don't need to reference ${outputDir}
in the definition, all the files in one contest are put into a specific directory.
What if we just made codeRoot = ${Contest.name} and removed ${Contest.name} from outputFile ? As long as people can put absolute paths it would work.
For the record. Some people might prefer to save all files in the same folder, without organizing by contest.
That sounds good, let's do that.
Sorry, I used the site to turn issue into pull request wrongly and I accidentally turned this issue into a PR. But if you agree with the idea to turn coderoot into ${Contest.Name}, that's great.
Nowadays we have plenty of templates and it is likely we'll get more and more. Each are supposed to be created in the problem's code folder.
What if the coder wants to change this folder? Doesn't like ${Contest.Name}, wants just ".", or wants a folder per problem, or etc? Currently the user has to change the output file location in each of the templates he is using.
Although it is great to allow templates to be saved in different folders, I think that having a ${OutputFolder} variable would be great.
Example default.conf under this idea:
If user changes outputfolder, all templates will output to the new location.