Skip to content

Commit 6d01dec

Browse files
committed
Update README.md
Signed-off-by: Eric Wang <skygragon@gmail.com>
1 parent 77a3b34 commit 6d01dec

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Great thanks to leetcode.com, an really awesome website!
1616
* [**GENERATING**](https://github.com/skygragon/leetcode-cli/blob/master/doc/commands.md#show) source code template for further coding.
1717
* Support live [**TEST**](https://github.com/skygragon/leetcode-cli/blob/master/doc/commands.md#test) and [**SUBMIT**](https://github.com/skygragon/leetcode-cli/blob/master/doc/commands.md#submit) againts leetcode.com.
1818
* [**AUTO LOGIN**](https://github.com/skygragon/leetcode-cli/blob/master/doc/advanced.md#auto-login) among multiple sessions with single leetcode account.
19+
* Retrieve your previous [**SUBMISSION**](https://github.com/skygragon/leetcode-cli/blob/master/doc/commands.md#submission) thus you can easily backup and manage your code.
1920

2021
## Prerequisites
2122

doc/commands.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* [help](#help)
44
* [list](#list)
55
* [show](#show)
6+
* [submission](#submission)
67
* [submit](#submit)
78
* [test](#test)
89
* [user](#user)
@@ -126,6 +127,33 @@ Display problem details. With `-g`+`-l`, the code template could be auto generat
126127
UPDATE (2016/2/13):
127128
The return format had been changed to zero-based indices. Please read the above updated description carefully.
128129

130+
## submission
131+
132+
Retrieve your existing submissions from leetcode.com and save to local files.
133+
134+
* For AC-ed problem, the last accepted submission will be retrieved, which output in green color.
135+
* For non AC-ed problem, the last non-accepted submission will be retrieved, which output in yellow.
136+
* If the submission file already exists in local, it will skip retrieving and output in white.
137+
138+
Available options:
139+
140+
* `-o` to specify the output folder.
141+
* `-a` to work against all problems.
142+
* Or work against specfic problem only.
143+
* `lc submission 1`
144+
* `lc submission two-sum`
145+
146+
147+
*Examples*
148+
149+
$ lc submission -a -o tmp
150+
151+
[303] Range Sum Query - Immutable tmp/range-sum-query-immutable.52178990.ac.cpp
152+
[319] Bulb Switcher tmp/bulb-switcher.52257927.ac.cpp
153+
[313] Super Ugly Number tmp/super-ugly-number.52256965.ac.cpp
154+
......
155+
[ 1] Two Sum tmp/two-sum.73790064.ac.cpp
156+
129157
## submit
130158

131159
Submit code to leetcode.com.

0 commit comments

Comments
 (0)