Skip to content

cameron93lin/leetcode-cli

 
 

Repository files navigation

npm version Releases license Build Join chat at https://gitter.im/skygragon/leetcode-cli

leetcode-cli

A productive cli tool to enjoy leetcode!

Great thanks to leetcode.com, a really awesome website!

ReleasesInstallDocsCommandsAdvancedPlugins

Personal Change

Add three more features for List command.

  1. -c to generate .csv format file for all questions. will include companies tag and companies with 3 differnt time period column. Example useage: leetcode list -c
    • combine '-z' for Chinese column output Example useage: leetcode list -c -z (design for better update experience for Leetcode Spreadsheet)
  2. -o to set .csv format file output directory. Default directory: ~/.lc
  3. -p to filter questions by 3 different time period:
    • 1 for questions in recent 0~6 months
    • 2 for questions in recent one year
    • 3 for questions in recent two years
    • Should be used with -t and with company filter words
    • Example useage: leetcode list -t netfilx -p 1

Add updateData function for Company plugin. function will include following feature.

  1. Update company tag if current user is vip user.
  2. Will use default value to set company tag if current user is not vip user.(data updated at 2021.03.19)
  3. Will store current company tags setting in ~/.lc/leetcode/cache/COMPONIES.json and ~/.lc/leetcode/cache/TAGS.json and try to update it if the file is missing.

Screenshot

Quick Start

Read help first                         $ leetcode help
Login with your leetcode account        $ leetcode user -l
Browse all questions                    $ leetcode list
Choose one question                     $ leetcode show 1 -g -l cpp
Coding it!
Run test(s) and pray...                 $ leetcode test ./two-sum.cpp -t '[3,2,4]\n7'
Submit final solution!                  $ leetcode submit ./two-sum.cpp

About

A cli tool to enjoy leetcode!

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 99.2%
  • Other 0.8%