Crates.io | leetcode-picker |
lib.rs | leetcode-picker |
version | 0.1.8 |
source | src |
created_at | 2021-06-12 17:56:39.892382 |
updated_at | 2024-05-10 01:27:19.295597 |
description | Command line app for picking leetcode quiz |
homepage | |
repository | https://github.com/ccqpein/leetcode-picker |
max_upload_size | |
id | 409376 |
size | 100,245 |
CAUTION: this tools isn't mainmtain anymore
This is a tiny app for picking the quiz from leetcode, print out quiz description and code snippet.
Firstly, login leetcode and find out the cookie csrftoken
in cache, it looks like c6J80TGFMuNrdy4O9cuedV9fSSDw112xRUmTqkcgUs9sYbxxxxxxxxxxxx
. Then:
leetcode-picker --id 1 -c rust --token c6J80TGFMuNrdy4O9cuedV9fSSDw112xRUmTqkcgUs9sYbxxxxxxxxxxxx
.
Or you can put token inside separate file ./vault/csrftoken
echo 'c6J80TGFMuNrdy4O9cuedV9fSSDw112xRUmTqkcgUs9sYbxxxxxxxxxxxx' > ./vault/csrftoken
then the ./vault/csrftoken
file is your token file, and run like leetcode-picker --id 1 -c rust
will do the same thing as command before.
Unless you give --id
or --name
, you always need -r
for randomly pick.
Help
leetcode-picker -h
Pick random quiz
leetcode-picker -r
or leetcode-picker --random
Pick random quiz until you are satisfied
leetcode-picker -r -i
Pick quiz by name
leetcode-picker --name two-sum
Pick quiz by id
leetcode-picker --id 1
Pick special level quiz
leetcode-picker -r -l hard
Pick code-snippet
leetcode-picker --id 1 -c rust
(show rust code snippet)
Custom description format
leetcode-picker --id 1 -c rust --temp-str 'source link: {source}, title: {title}'
Custom description format with file
leetcode-picker --id 1 -c rust --temp-file ./tests/README_temp
all template fields: