Skip to content

Daily LeetCode progress emails sent to your accountability partner. Easy configuration. Set and forget.

Notifications You must be signed in to change notification settings

isaiah-garcia/LeetCode-Accountability-Progress-Reporter

Repository files navigation

Accountable

accountable logo

demo

Accountable logs in to LeetCode, retrieves your progress and sends an update to your accountability partner's email. Accountable Demo

Simple Email Reports

SUCCESS if you completed more than 5 problems!

success email

HELP if you have not completed at least 5 problems.

help email

Installation

Step 1: Install node

npm init -y
npm install dotenv date-fns puppeteer nodemailer

Step 2: Go to your email account and create a new app password for nodemailer to send emails through your account (assuming you have 2FA). Here is the link for gmail: https://myaccount.google.com/apppasswords

After you create your nodemailer password, add it to your .env file (see next step).

Step 3: Add .env to gitignore, then fill out your .env file like this:

# URLs                                    
LOGIN_URL=https://leetcode.com/accounts/login/?next=%2Fprogress%2F
TARGET_URL=https://leetcode.com/progress/

# Login Credentials
USERNAME=YourUsername
PASSWORD=YourPassword

# Email Credentials
EMAIL_USER=YourEmail
EMAIL_PASS=YourNodeMailerPassword

# Recipient Email Address
EMAIL_RECIPIENT=AccountabilityPartnerEmail

If you login using a 3rd party, simply replace the LOGIN_URL= link:
Google: https://leetcode.com/accounts/google/login/?next=%2F
GitHub: https://leetcode.com/accounts/github/login/?next=%2F
Facebook: https://leetcode.com/accounts/facebook/login/?next=%2F
LinkedIn: https://leetcode.com/accounts/linkedin_oauth2/login/?next=%2Fprogress%2F

Step 4 (last step): Setup CronJob in terminal

crontab -e

Mine is setup like this: execution time, file path, node path, file name >> log file

Followed by a command to wake up my machine 1 minute before.

0 18 * * * cd path/to/file && path/to/node/version accountable.js >> /tmp/accountable.log 2>&1

59 17 * * * sudo rtcwake -m no -t $(date +\%s -d 'today 17:59')

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

About

Daily LeetCode progress emails sent to your accountability partner. Easy configuration. Set and forget.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published