Skip to content

Commit e63019f

Browse files
committed
update readme
1 parent d4bb097 commit e63019f

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,28 @@
99
## Install
1010

1111
```bash
12+
# homebrew
1213
$ brew tap zcong1993/homebrew-tap
1314
$ brew install zcong1993/homebrew-tap/leetcode-tool
1415

16+
# 直接安装
17+
curl -fsSL https://bina.egoist.sh/zcong1993/leetcode-tool | sh
18+
1519
# show help
1620
$ leetcode-tool help
1721
```
1822

23+
## 配置
24+
25+
可以在项目根目录创建 `.leetcode.json` 配置文件.
26+
27+
```js
28+
{
29+
"lang": "go", // 项目全局语言, 配置后 new 命令 --lang 参数可省略, 目前支持 go ts js py3
30+
"cookie": "xxx"
31+
}
32+
```
33+
1934
## 使用说明
2035

2136
[https://blog.cong.moe/post/2020-11-30-leetcode_tool](https://blog.cong.moe/post/2020-11-30-leetcode_tool)
@@ -105,7 +120,7 @@ $ leetcode-tool update
105120

106121
因为 LeetCode 网站现在某些请求会校验 cookie, 采取的修复方法是请求增加了 cookie, 但是内置 cookie 没法确保长期有效.
107122

108-
所以 `.leetcode.json` 配置文件中支持 cookie 配置, 后续请访问此链接 https://leetcode-cn.com/api/problems/all 拿到 cookie 自行更新配置文件.
123+
所以 `.leetcode.json` 配置文件中支持 cookie 配置, 后续请访问此链接 [https://leetcode-cn.com/api/problems/all](https://leetcode-cn.com/api/problems/all) 拿到 cookie 自行更新配置文件.
109124

110125
## License
111126

0 commit comments

Comments
 (0)