unneon/icie

Can you add a feature to show ongoing competitions on different website. Currently using alt+F9 it shows competitions which will start in future.

nadimakhtar97 opened this issue · 6 comments

Can you add a feature to show ongoing competitions on different website. Currently using alt+F9 it shows competitions which will start in future.

If I recall correctly, I did not add this originally because CodeChef has a lot of ongoing contests, which would clog up the view. But now I'm thinking I can just display them at the bottom of the list with an [ONGOING] prefix or something.

It seems pretty easy to do: adding some bool is_ongoing for tasks, disable skipping parsing ongoing contests, add a prefix when displaying them. I will try to implement it sometime soon when I find the time. If you want to take a stab at this yourself, I will be happy to help!

I actually don't have any idea about rust language. But with your help, I will try my best.

Sure! If you want to learn Rust, check out the Rust Book or Rust By Example, which are both really good. This change should not require a lot of knowledge about the language though, so you can also just look specific things up in RBE or ask me if you don't understand something. :)

After that, you can start with compiling the plugin and running the compiled extension to make sure everything works - the details on how to do that are in CONTRIBUTING.md. Tell me if anything there does not work though or is unclear since it's best to fix such stuff anyway.

There are three changes this feature will require. First, add an is_ongoing field to the ContestDetails struct. Second, add code that sets this field to true or false (the hardest part, see next paragraph). Third, add an if here that adds the [ONGOING] prefix to the option name, and change the sorting order here so that ongoing contests are displayed last.

I suggest to start with the first and third part, and only then do the second one properly. To start with, just set is_ongoing as always true for CodeChef, and always false for AtCoder and Codeforces. Then you can check if everything is compiling, and if displaying the [ONGOING] prefix works. I'll explain how to actually set is_ongoing to real values once you get to this point - leave a comment here and I'll respond.

If you get stuck at any point, or my explanations are unclear (they probably are...), please tell me here! I'll be happy to help.

Just so you know, I created a Discord for developing ICIE. Feel free to join and ask me if you are stuck on something!

Thanks for considering me!!

I have added scanning CodeChef permanent/ongoing contests, since this already worked on Codeforces/AtCoder. When I release 0.7.22, they will be displayed at the bottom of the contest scan list.