File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change 11# leetcode-tool ![ goreleaser] ( https://github.com/zcong1993/leetcode-tool/workflows/goreleaser/badge.svg )
2+
23<!--
34[](https://goreportcard.com/report/github.com/zcong1993/leetcode-tool)
45-->
@@ -15,6 +16,57 @@ $ brew install zcong1993/homebrew-tap/leetcode-tool
1516$ leetcode-tool help
1617```
1718
19+ ## 主要功能
20+
21+ ### 新建题目代码
22+
23+ ` leetcode-tool new [<flags>] <number> `
24+
25+ number 为网页上显示的题目序号, 例如: ` leetcode-tool new 1 ` 创建第一题的代码.
26+
27+ 此命令会创建一个文件夹和三个文件, 分别是: 代码文件, 测试文件, 题目描述文件.
28+
29+ 题目信息从 leetcode 拉取, 并生成一些元信息供更新命令分类更新题目完成状态.
30+
31+ ### 查看题目信息
32+
33+ ` leetcode-tool meta <number> `
34+
35+ 展示某道题目一些信息.
36+
37+ ### 更新题目状态
38+
39+ ` leetcode-tool update `
40+
41+ 根据已完成题目类别更新 ` toc ` 文件夹下的算法分类状态.
42+
43+ ### 更新 leetcode 分类
44+
45+ ` leetcode-tool tags `
46+
47+ 从 leetcode 网站拉取最新分类, 并创建 ` toc ` 对应文件, 一般不需要运行.
48+
49+ ## Workflow
50+
51+ 如何刷题?
52+
53+ ``` bash
54+ # 1. 新建一个题目
55+ $ leetcode-tool new 1
56+ # 2. 写出题解, 和测试代码
57+ ...
58+ # 3. 更新 toc 文件
59+ $ leetcode-tool update
60+ # 4. 提交代码
61+ ```
62+
63+ ## 为什么需要这个工具
64+
65+ 1 . leetcode 网页 IDE 太弱了, 我需要本地解题
66+ 1 . 网页题解难以沉淀, 例如一道题我希望整理多种解法
67+ 1 . GitHub 易于分享题解
68+ 1 . 根据自己需要, 组织题目做专题之类的总结
69+
1870## License
1971
2072MIT © ; zcong1993
You can’t perform that action at this time.
0 commit comments