Closed iofik closed 10 years ago
Adding something to string() renderer or making a whole new renderer would be needed.
There are contests who are not SRMs, what do you expect it to do in that case?
@shivawu: What if we allow people to create their own named renderers and add them to greed through config?
Maybe I can add a special parameter to ContestCategory to customize the "SRM " prefix.
Another option is to add two more fields to Contest: ${Contest.Type} and ${Contest.Number} -- or something like this. This will allow me to create directory structure I want. Also such structure can be used: ./SRM/499
Yeah, I think we can add some useful fields that can be used in our template system, as you've mentioned above. But anyway, what do you expect for non-SRM rounds (e.g. Topcoder Open 2013 Round 1)?
Just rename them manually after contest is finished. =) TCO do not occur too often. I know, my naming scheme is flawed, but I kind of got used to it.
In PR #100 I added a way to do this:
codeRoot = "${Contest;category(srm=1,no-space,srm-text=) }"
It will make SRM 456
render as 456. The remaining contest names will render as TCO
, TCHS
or Other
. But you can change them too.
New customization #100 is good itself, but seems too hacky for this purpose :-)
Still thinking allowing custom renderers is a good idea because people will always have very specific needs.
Contest
class so thatthe Contest object can provide more information. I'll just merge it for now.
@iofik Does this solve your problem?
Guys, thanks for all your quick responses and help!
@shivawu Yes.
I want Greed to generate files in directory {Workspace}/499/ instead of {Workspace}/SRM 499/
I looked through documentation and code and could not find a way to do it. I think some special named renderer might help here. Like 'substring' or 'word'.