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 b5a5cfa

Browse files
[pages] update docs.
Signed-off-by: Eric Wang <skygragon@gmail.com>
1 parent 24b85ea commit b5a5cfa

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

‎docs/advanced.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ title: Advanced Topic
99
* [Cache](#cache)
1010
* [Configuration](#configuration)
1111
* [Color Themes](#color-themes)
12+
* [File Name](#file-name)
1213
* [Log Levels](#log-levels)
1314
* [Plugins](#plugins)
1415

@@ -91,6 +92,10 @@ The config file is saved in `~/.lc/config.json`, here is a full exmaple (include
9192
"enable": true,
9293
"theme": "default"
9394
},
95+
"file": {
96+
"show": "${fid}.${slug}",
97+
"submission": "${fid}.${slug}.${sid}.${ac}"
98+
},
9499
"icon": {
95100
"theme": ""
96101
},
@@ -107,6 +112,7 @@ Here are some useful settings:
107112
* `code:lang` to set your default language used in coding.
108113
* `color:enable` to enable colorful output.
109114
* `color:theme` to set color theme used in output. (see [Color Theme](#color-theme))
115+
* `file.show` to set filename pattern for generated code file. (see [File Name](#file-name))
110116
* `icon:theme` to set icon them used in output.
111117
* `plugins` to config each installed plugins. (see [Plugins](#plugins))
112118

@@ -167,6 +173,23 @@ Of course you can create your own themes if you like, look into `colors` folder
167173
"yellow": "#ffff00"
168174
}
169175

176+
# File Name
177+
178+
You could configure file name pattern in code generation.
179+
180+
* config `file.show` for generated file in `show`.
181+
* config `file.submission` for downloaded file in `submission`.
182+
183+
Followings are some variables you could used in the pattern:
184+
185+
* `${fid}` for question id. (e.g. `123`)
186+
* `${slug}` for dash-separated question name. (e.g. `add-two`)
187+
* `${name}` for space-separated questions name. (e.g. `Add Two`)
188+
* `${level}` for question level. (e.g. `Hard`)
189+
* `${category}` for question category. (e.g. `algorithms`)
190+
* `${sid}` for submission id.
191+
* `${ac}` for accept status of existing submission.
192+
170193
# Log Levels
171194

172195
* `-v` to enable debug output.

‎docs/install.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ layout: default
33
title: Installation
44
---
55

6+
# All in One (beta)
7+
8+
No need to install node.js. Now available on 64bits linux, mac, and windows.
9+
10+
[Download](https://github.com/skygragon/leetcode-cli/releases)
11+
612
# Prerequisites
713

814
Install the latest LTS version of `node.js` (`npm` included):
@@ -49,6 +55,11 @@ Similar with above, while you can introduce your own changes as you wish.
4955
$ cd leetcode-cli && ./bin/install
5056
$ leetcode version
5157

58+
### From source (all-in-one)
59+
60+
$ git clone http://github.com/skygragon/leetcode-cli
61+
$ cd leetcode-cli && node ./bin/pkg
62+
5263
### From docker
5364

5465
NOTE: This is just a tiny taste to let you feel that leetcode-cli is. Please use other ways above to install leetcode-cli if you like it.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /