Package: leetcode-study-tool
💻 Leetcode Study ToolThis package lets you get grokking as quickly as possible with Leetcode. It provides a command-line tool for interracting with Leetcode to create either an Excel file or Anki flashcards for study. Currently, this tool supports taking in a list of leetcode question slugs or URLs or popular study sets (including theBlind 75,Grind 75, andNeetcode 150).🤔 Why?This package was created as an opinionated alternative to other existing packages (as listed at the bottom of this README).📥 Installation$pipinstallleetcode-study-tool💻 Usageusage:leetcode-study-tool[-h](--urlURL|--fileFILE|--preset{blind_75,grind_75,grind_169,neetcode_150,neetcode_all})[--format{anki,excel}][--csrfCSRF][--outputOUTPUT][--languageLANGUAGE]GeneratesproblemsfromLeetCodequestionsinadesiredformat.

options:-h,--helpshowthishelpmessageandexit--urlURL,-uURLTheURL(s)orslug(s)oftheLeetCodequestion(s)togenerateproblem(s)for.(default:None)--fileFILE,-fFILEThefilecontainingtheURL(s)orslug(s)oftheLeetCodequestion(s)togenerateproblem(s)for.(default:None)--preset{blind_75,grind_75,grind_169,neetcode_150,neetcode_all},-p{blind_75,grind_75,grind_169,neetcode_150,neetcode_all}Thepresettousetogenerateproblem(s)for.(default:None)--format{anki,excel},-F{anki,excel}TheformattosavetheLeetcodeproblem(s)in.(default:anki)--csrfCSRF,-cCSRFTheCSRFtokentouseforLeetCodeauthentication.(default:None)--outputOUTPUT,-oOUTPUTTheoutputfiletowritetheproblem(s)to.(default:output.txt)--languageLANGUAGE,-lLANGUAGEThelanguagetogenerateproblem(s)for.(default:None)💡 ExampleIn the simplest case, if you want toGrokthe most commonly asked questions, you should generate from a preset. For example, generating Anki cards from theGrind 75is as simple as$leetcode-study-tool-pgrind_75Perhaps, instead, you'd prefer to import questions that you've already worked on. In a directory with a file namedquestions.txt, where each line is either a Leetcode problem URL or slug (or a combination of both), we can run the command$leetcode-study-tool-fquestions.txtwhich will generate the fileoutput.txt. We can then open Anki to import these problems as demonstrated below,ensuring to select semicolon as a field separator.📒 AnkiWhen generating an Anki output, the resulting "cards" are saved as a.txtfile. These cards include three fields:The front of the study card, containing the question ID, Title, URL, and problem descriptionThe publicly available solutions (and NeetCode solution, if available)The tags associated with the problem (i.e., if the problem involves a hash map, arrays, etc...)📊 ExcelWhen generating an Excel output, the resulting questions are saved in an.xlsxfile. Each problem includes the following fields:ID of the leetcode questionTitle of the leetcode questionURL of the leetcode questionLast date that this question was attempted by the user (please note that this is not pulled from your leetcode profile, but left for you to update as you progress in solving leetcode questions)The tags associated with the problem (i.e., if the problem involves a hash map, arrays, etc...)Neetcode video link (if it exists)Solution links for the problem (if they are reachable)Companies that have asked this question recently in interviews (if they are reachable)🛣 RoadmapUse TQDM to show card generation progressAdd support for exporting to an excel sheetAdd support for showing neetcode solutions on the back of the card as aAdd support for getting the difficulty of questionsAdd support for fetching premium questions via authentificationAdd support for importing cards into QuizletAdd support for fetching questions by topic or tag
linkAllow for the definition of custom formatters and outputs (including which fields are included or excluded)Reach 90% test coverage🔎 Other Usefull StuffRemember anything with AnkiLeetcode Anki Card GeneratorLeetcode API