Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0d68c73

Browse files
Merge pull request clearloop#20 from xiaoxiae/master
make README.md more user-friendly
2 parents ee32228 + 0e446b8 commit 0d68c73

File tree

1 file changed

+22
-29
lines changed

1 file changed

+22
-29
lines changed

β€ŽREADME.md

Lines changed: 22 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,24 @@
1515
## Features
1616

1717
+ [x] the edit flow β€”β€” solution files will generate automatically!
18-
+ [x] support python script to filter questions
19-
+ [ ] doc support, `lc-rs` can compile the annotation of your solutions to markdown!
20-
+ [ ] support local signal to keep coding as longer as you want.
21-
22-
## Building
18+
+ [x] support Python script to filter questions
19+
+ [ ] doc support, `lc-rs` can compile the annotation of your solutions to Markdown!
20+
+ [ ] support local signal to keep coding as longer as you want
2321

22+
## Installing
2423
```sh
2524
cargo install leetcode-cli
2625
```
2726

28-
## Usage
27+
### `error[E0554]`
28+
If this happens when compiling the program, it means that the package cannot be compiled with stable Rust. To fix this, install Rust Nightly and try the following:
29+
```sh
30+
rustup install nightly
31+
cargo +nightly install leetcode-cli
32+
```
2933

30-
**Please make sure you have logined in `leetcode.com` with `chrome`**, more info plz checkout [this](#cookies)
34+
## Usage
35+
**Make sure you have logged in to `leetcode.com` with `Chrome`**. See [Cookies](#cookies) for why you need to do this first.
3136

3237
```sh
3338
leetcode 0.3.0
@@ -54,7 +59,7 @@ SUBCOMMANDS:
5459

5560
## Example
5661

57-
For example, if your config is:
62+
For example, given this config (can be found in `~/.leetcode/leetcode.toml`):
5863

5964
```toml
6065
[code]
@@ -148,55 +153,44 @@ leetcode submit 1
148153

149154
## Cookies
150155

151-
The cookie plugin of leetcode-cil can work on OSX and [Linux][#1], **If you are on other platforms or your cookies just don't want to be catched**, you can handwrite your LeetCode Cookies to `~/.leetcode/leetcode.toml`
156+
The cookie plugin of leetcode-cli can work on OSX and [Linux][#1]. **If you are on a different platform, there are problems with caching the cookies**, you can manually input your LeetCode Cookies to the configuration file.
152157

153158
```toml
154-
# Make sure `leetcode.toml` file is placed at `~/.leetcode/leetcode.toml`
155159
[cookies]
156160
csrf = "..."
157161
session = "..."
158162
```
159163

160-
For Example, if you're using chrome to login to leetcode.com.
164+
For Example, using Chrome (after logging in to LeetCode):
161165

162166

163167
#### Step 1
164168

165-
Open chrome and paste the link below to the `chrome linkbar`.
169+
Open Chrome and navigate to the link below:
166170

167171
```sh
168172
chrome://settings/cookies/detail?site=leetcode.com
169173
```
170174

171175
#### Step 2
172176

173-
Copy the contents of `LEETCODE_SESSION` and `csrftoken`.
174-
175-
#### Step 3
176-
177-
Paste them to `session` and `csrf`.
178-
177+
Copy `Content` from `LEETCODE_SESSION` and `csrftoken` to `session` and `csrf` in your configuration file, respectively:
179178
```toml
180-
# Make sure `leetcode.toml` file is placed at `~/.leetcode/leetcode.toml`
181179
[cookies]
182180
csrf = "${csrftoken}"
183181
session = "${LEETCODE_SESSION}"
184182
```
185183

186-
187184
## Programmable
188185

189-
If we want to filter leetcode questions using our own python scripts, what should we do?
190-
191-
For example, our config is:
186+
If you want to filter LeetCode questions using custom Python scripts, add the following to your the configuration file:
192187

193188
```toml
194-
# Make sure `leetcode.toml` file is placed at `~/.leetcode/leetcode.toml`
195189
[storage]
196190
scripts = "scripts"
197191
```
198192

199-
We write our python scripts:
193+
Then write the script:
200194

201195
```python
202196
# ~/.leetcode/scripts/plan1.py
@@ -224,18 +218,17 @@ def plan(sps, stags):
224218
return ret
225219
```
226220

227-
Then we can run filter as what we write now:
221+
Then run `list` with the filter that you just wrote:
228222

229223
```sh
230224
leetcode list -p plan1
231225
```
232226

233-
Well done, enjoy it!
227+
And that's it! Enjoy!
234228

235229

236230
## PR
237-
238-
PR is welcome!! [Come][pr] As You Are!
231+
[PRs][pr] are more than welcome!
239232

240233
## LICENSE
241234
MIT

0 commit comments

Comments
(0)

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /