Leetcode2Obsidian is a straightforward solution for saving Leetcode problems directly into your Obsidian vault in just three easy steps! This script is inspired by leetcode-puller-obsidian and leetcode-obsidian-import.
- Easy integration with Obsidian.
- Save Leetcode problems with a single click.
- Supports automatic note generation.
This script relies on the Tampermonkey extension and the obsidian-local-rest-api. Before you get started, ensure that you have Tampermonkey installed in your browser and that the obsidian-local-rest-api is set up in your Obsidian.
- Copy the following two items, as you will need them later:
- HTTPS API URL (If you haven't configured a certificate, use the HTTP API URL instead.)
- API Key
- Download the save2obsidian file from this repository.
- Load it into Tampermonkey.
After coding a problem on Leetcode, simply right-click and select Tampermonkey -> Leetcode to Obsidian. The script will automatically generate your note.
The first time you run the script, you will need to provide the API URL, API Key, and Document Path.
MIT