Take LeetCode problems notes in Notion: easily organize topics and quickly find note when needed
-
Duplicate this notion database template
-
Sign up Twilio, and get TWILIO_AUTH_TOKEN
-
Install dependencies
npm install
- Create an .env file with your notion key and twilio auth token
NOTION_KEY=
NOTION_DATABASE_ID=
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
TWILIO_FROM_PHONE_NUMBER=
TWILIO_TO_PHONE_NUMBER=
Option 1: command-line interface
$ node cli.js -h
Usage: cli [options]
Options:
-V, --version output the version number
-q, --question <leetcode> LeetCode question
-t, --time <type> Add Optional due date
-d, --debug output extra debugging
-h, --help display help for command
$ node cli.js -q 21
{
id: 21,
title: 'Merge Two Sorted Lists',
url: 'https://leetcode.com/problems/merge-two-sorted-lists/',
lvl: 'Easy 🍀',
frequency: 2.901843584652108,
date: '2021-12-17T17:10:44-08:00',
topics: [ { name: 'Linked List' }, { name: 'Recursion' } ]
}
Option 2: module
$ node demo.js
MIT