Leetcodectl
Leetcodectl is a unoffical command line tools for leetcode.com
How to install
Download from github release
found binary from https://github.com/41tair/leetcodectl/releases
Build from code
git clone https://github.com/41tair/leetcodectl.git &&
make &&
ln -s /usr/local/bin/leetcodectl $(pwd)/leetcodectl/leetcodectl
Command
leetcodectl is leetcode command line tools
Usage:
leetcodectl [flags]
leetcodectl [command]
Available Commands:
config
edit
help Help about any command
history
login
submit
update
view
Flags:
-h, --help help for leetcodectl
Use "leetcodectl [command] --help" for more information about a command.
How to use it
Use leetcodectl in terminal
1.Use login with session
leetcodectl login -s "your leetcode sessiong"
2.Get problem list
leetcodectl update
3.Download problem detail
leetcodectl update 1
4.Edit a answer
leetcodectl edit 1
5.Submit
leetcodectl submit 1
6.View submit result
leetcodectl history 1
Use leetcode.el in emacs
view leetcode.el for more details
Tips
1.Config default path is "~/.leetcodectl/leetcodectl.toml"
2.If you using chrome, use EditThisCookie get leetcode session
3.The session will expire in two weeks and you will need to login again
TODO
- leetcode test
- add custom head
- parse image addr
-
Login with github OAuth
-
test and test coverage
-
forbidden check
-
Add task and related problem
-
Multi layer use custom struct
-
Search by problem content
-
Leetcode struct