Skip to content

Commit 7128eb3

Browse files
committed
Bump to 0.4.0
* update README.md Signed-off-by: Eric Wang <[email protected]>
1 parent 83e323b commit 7128eb3

File tree

2 files changed

+43
-14
lines changed

2 files changed

+43
-14
lines changed

README.md

+42-13
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ A cli tool to enjoy leetcode!
88

99
Great thanks to leetcode.com, an really awesome website!
1010

11+
## What can it do?
12+
13+
* A very **EFFICIENT** way to fight problems, see [Best Practice](#best-practice).
14+
* **CACHING** problems locally thus you can easily scan & think it offline.
15+
* Do everything in CLI, no one even knows you are doing leetcode :p
16+
* Auto **GENERATING** source code template for you.
17+
* Support case **TEST** and **SUBMIT** to leetcode.com.
18+
* **AUTO LOGIN** among multiple sessions with single leetcode account.
19+
1120
## Table of Contents
1221

1322
* [Prerequisites](#prerequisites)
@@ -197,26 +206,35 @@ Login with your leetcode account (username or email).
197206
### version
198207

199208
$ lc version
200-
0.3.0
209+
0.4.0
201210

202211
* `-v` to show verbose info, e.g. config, cache dir.
203212

204213
*Example*
205214

206215
$ lc version -v
207-
leetcode-cli 0.3.0
208-
209-
Cache: /Users/skygragon/.lc/
216+
_ _ _
217+
| | | | | |
218+
| | ___ ___| |_ ___ ___ __| | ___
219+
| |/ _ \/ _ \ __|/ __|/ _ \ / _` |/ _ \
220+
| | __/ __/ |_ (__| (_) | (_| | __/
221+
|_|\___|\___|\__|\___|\___/ \__,_|\___| CLI v0.4.0
222+
223+
[Environment]
224+
Cache: /Users/skygragon/.lc/
210225
Config: /Users/skygragon/.lcconfig
211226

212-
BASE_URL = https://leetcode.com
213-
LOGIN_URL = https://leetcode.com/accounts/login/
214-
PROBLEMS_URL = https://leetcode.com/problems/
215-
TEST_URL = https://leetcode.com/problems/$key/interpret_solution/
216-
SUBMIT_URL = https://leetcode.com/problems/$key/submit/
217-
VERIFY_URL = https://leetcode.com/submissions/detail/$id/check/
218-
LANG = cpp
219-
USE_COLOR = true
227+
[Configuration]
228+
BASE_URL: https://leetcode.com
229+
LOGIN_URL: https://leetcode.com/accounts/login/
230+
PROBLEMS_URL: https://leetcode.com/api/problems/algorithms/
231+
PROBLEM_URL: https://leetcode.com/problems/$id
232+
TEST_URL: https://leetcode.com/problems/$key/interpret_solution/
233+
SUBMIT_URL: https://leetcode.com/problems/$key/submit/
234+
VERIFY_URL: https://leetcode.com/submissions/detail/$id/check/
235+
LANG: java
236+
USE_COLOR: true
237+
AUTO_LOGIN: true
220238

221239
## Tips
222240

@@ -246,5 +264,16 @@ Create a file named `.lcconfig` in your home directory.
246264

247265
{
248266
"LANG": "java",
249-
"USE_COLOR": true
267+
"USE_COLOR": true,
268+
"AUTO_LOGIN": false
250269
}
270+
271+
### Auto login
272+
273+
Leetcode.com is restricting one session only in the same time, which means if you have login same account otherwhere, the existing login session will be expired immediately. This will greatly harm your experience since you have to re-login again and again among different sessions.
274+
275+
However leetcode-cli will help some one this.It will try to save you from this trial and re-login transparently without interrupting your current work whenever it notices the session is already expired. To enable this in your config:
276+
277+
"AUTO_LOGIN": true
278+
279+
**NOTE: if enabled, your PASSWORD will be persisted locally to achieve auto login, so PLEASE be careful to ONLY enable this on your OWN computer for the sake of security!**

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "leetcode-cli",
3-
"version": "0.3.0",
3+
"version": "0.4.0",
44
"description": "A cli tool to enjoy leetcode!",
55
"preferGlobal": "true",
66
"bin": {

0 commit comments

Comments
 (0)