{"id":15017239,"url":"https://github.com/fspv/leetcode-anki","last_synced_at":"2025-05-16T08:00:21.657Z","repository":{"id":37990151,"uuid":"408995068","full_name":"fspv/leetcode-anki","owner":"fspv","description":"Anki cards generator for Leetcode","archived":false,"fork":false,"pushed_at":"2025-02-26T22:48:54.000Z","size":77,"stargazers_count":339,"open_issues_count":7,"forks_count":47,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-12T04:47:56.271Z","etag":null,"topics":["anki","leetcode","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fspv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-21T22:46:17.000Z","updated_at":"2025-04-08T16:01:39.000Z","dependencies_parsed_at":"2024-09-20T14:30:44.522Z","dependency_job_id":"1a70e05b-b475-400c-a2bc-9d486b5afa5c","html_url":"https://github.com/fspv/leetcode-anki","commit_stats":{"total_commits":57,"total_committers":4,"mean_commits":14.25,"dds":0.08771929824561409,"last_synced_commit":"061d51144bfc6a2394ee57e5eacf3b1853514b1f"},"previous_names":["prius/leetcode-anki"],"tags_count":75,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fspv%2Fleetcode-anki","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fspv%2Fleetcode-anki/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fspv%2Fleetcode-anki/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fspv%2Fleetcode-anki/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fspv","download_url":"https://codeload.github.com/fspv/leetcode-anki/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254493382,"owners_count":22080126,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anki","leetcode","python"],"created_at":"2024-09-24T19:50:06.438Z","updated_at":"2025-05-16T08:00:21.533Z","avatar_url":"https://github.com/fspv.png","language":"Python","readme":"\n![build](https://github.com/prius/leetcode-anki/actions/workflows/build-deck.yml/badge.svg)\n![style](https://github.com/prius/leetcode-anki/actions/workflows/style-check.yml/badge.svg)\n![tests](https://github.com/prius/leetcode-anki/actions/workflows/tests.yml/badge.svg)\n![types](https://github.com/prius/leetcode-anki/actions/workflows/type-check.yml/badge.svg)\n![license](https://img.shields.io/github/license/prius/leetcode-anki)\n\n# Leetcode Anki card generator\n\n## Summary\nBy running this script you'll be able to generate Anki cards with all the leetcode problems.\n\nI personally use it to track my grinding progress.\n\n![ezgif-7-03b29041a91e](https://user-images.githubusercontent.com/1616237/134259809-57af6afb-8885-4899-adf8-a2639977baeb.gif)\n\n![photo_2021-09-29_08-58-19 jpg 2](https://user-images.githubusercontent.com/1616237/135676120-6a83229d-9715-45fb-8f85-1b1b27d96f9b.png)\n![photo_2021-09-29_08-58-21 jpg 2](https://user-images.githubusercontent.com/1616237/135676123-106871e0-bc8e-4d23-acef-c27ebe034ecf.png)\n![photo_2021-09-29_08-58-23 jpg 2](https://user-images.githubusercontent.com/1616237/135676125-90067ea3-e111-49da-ae13-7bce81040c37.png)\n\n## Prerequisites\n1. [python3.8+](https://www.python.org/downloads/) installed\n2. [python virtualenv](https://pypi.org/project/virtualenv/) installed\n3. [git cli](https://github.com/git-guides/install-git) installed\n4. [GNU make](https://www.gnu.org/software/make/) installed (optional, can run the script directly)\n5. \\*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.\n\n## How to run\nFirst download the source code\n```sh\ngit clone https://github.com/prius/leetcode-anki.git\ncd leetcode-anki\n```\n\nAfter that initialize and activate python virtualenv somewhere\n\nLinux/MacOS\n```sh\nvirtualenv -p python leetcode-anki\n. leetcode-anki/bin/activate\n```\n\nWindows\n```sh\npython -m venv leetcode-anki\n.\\leetcode-anki\\Scripts\\activate.bat\n```\n\nThen initialize necessary environment variables. You can get it directly from your browser cookies (`csrftoken` and `LEETCODE_SESSION`)\n\nLinux/Macos\n```sh\nexport LEETCODE_CSRF_TOKEN=\"xxx\"\nexport LEETCODE_SESSION_ID=\"yyy\"\n```\n\nWindows\n```sh\nset LEETCODE_CSRF_TOKEN=\"xxx\"\nset LEETCODE_SESSION_ID=\"yyy\"\n```\n\nAnd finally run for Linux/MacOS\n```sh\nmake generate\n```\nOr for Windows\n```sh\npip install -r requirements.txt\npython generate.py\n```\n\nYou'll get `leetcode.apkg` file, which you can import directly to your anki app.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffspv%2Fleetcode-anki","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffspv%2Fleetcode-anki","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffspv%2Fleetcode-anki/lists"}