ankushbhardwxj / codemon

cli to win programming contests
https://pypi.org/project/codemon/
MIT License
26 stars 12 forks source link

codemon init --count ? #81

Open Git-Harshit opened 3 years ago

Git-Harshit commented 3 years ago

Currently, Codemon is only supporting a fixed amount of code files being generated per contest. As evident for now, codemon just supports 3 practice files (which is okay), and 7 contest problem files (A-G, assuming one file per question in a contest, which does not always needs to be valid).

As per the current numbering and naming conventions for problems, it seems like codemon is well-adapted with the current cases of coding rounds in platforms like CodeForces, AtCoder, etc. While this can work with such contests for now, the problems may arise in cases when there are more than 7 contests in a competition (such as CodeChef Long Challenges, which feature 10 problems per challenge).

It'd be great if these counts of 3 and 7 problems per contest are kept as a default count, and codemon init gets an option to manually enter the problems count we'd like to generate using some flag for count. This would be handy for platforms other than CodeForces, which are not retrieved over web scraping for now.

Of course, to prevent misuse of the count flag (like passing in a very large value that keeps the files generating and filling up a lot of unnecessary memory), upper limit can also be included for the same. Please feel free to comment for any more details needed for the same.

ankushbhardwxj commented 3 years ago

@Git-Harshit : This is a great suggestion. Although we wanted to work solely for Codeforces (for now), this will be a great step towards supporting other platforms as well. Feel free to send in a PR !

ankushbhardwxj commented 3 years ago

Update: Using codemon init -f | --fetch {CF_ContestNo.} can be used while creating contest directories for codeforces contests. This would create the necessary files and also fetch inputs and outputs from Codeforces. In the future, we can support --count flag to support CodeChef.