skygragon / leetcode-cli

A cli tool to enjoy leetcode!
MIT License
3.65k stars 458 forks source link

[Feature Request] submit by session #149

Open yishanhe opened 5 years ago

yishanhe commented 5 years ago

"submit by session" is particularly useful, when a user wants to manage the submits under different sessions (e.g., by different tags, or by different programming languages, etc.)

To implement this feature, we need to add one more flag under the submit command to specify the session we want to submit against.

  -s, --session Targeted session                                 [string][default:""] 

In order not to disrupt the current active session set by the cli or on the web, we need to

  1. retrieve the current active session
  2. enable the target session
  3. submit the code
  4. switch back to the previous session

Thanks