By running this script you'll be able to generate Anki cards with all the leetcode problems.
I personally use it to track my grinding progress.
- python3.8+ installed
- python virtualenv installed
- git cli installed
- GNU make installed (optional, can run the script directly)
- *nix operating system (Linux, MacOS, FreeBSD, ...). Should also work for Windows, but commands will be different. I'm not a Windows expert, so can't figure out how to make it work there, but contributions are welcome.
First download the source code
git clone https://github.com/prius/leetcode-anki.git
cd leetcode-anki
After that initialize and activate python virtualenv somewhere
virtualenv -p python leetcode-anki
. leetcode-anki/bin/activate
Then initialize session id variable. You can get it directly from your browser (if you're using chrome, cookies can be found here chrome://settings/cookies/detail?site=leetcode.com)
export LEETCODE_SESSION_ID="yyy"
And finally run
make generate
You'll get leetcode.apkg
file, which you can import directly to your anki app.