Giter VIP home page Giter VIP logo

notion-habit-tracker's Introduction

Notion Habit Tracker

License: MIT

A fully automated Notion Habit Tracker template with real-time performance graph and monthly analytics.

notion_habit_tracket


Features

  • Automated daily page addition, either via Notion template repeat feature or by running the Python script once a year
  • Script will automatically delete any previous year pages, so they won't mess up with monthly analytics
  • Monthly analytics provide Habits completion % insights via star ratings โญ๏ธ
  • Real-time daily performance charts ๐Ÿš€
  • Habit completion visual cues using progress bar and custom star ratings
  • Notion formulae are used in a way, that user will only see current week and current monthly graph performance

Setup Pre-requisites

No Code Approach

  • With the new notion recurring template update, you can simply set an individual weekday template for a weekly repeat and it will automatically add a new page to the database.

Find Database ID

Login Notion in a browser and viewing the database as a full page, the database ID is the part of the URL after your workspace name and the slash (acme/) and before the question mark (?). The ID is 32 characters long, containing numbers and letters. Copy the ID and paste it somewhere you can easily find later.

Repeat this process for both Habits DB and Analytics DB, and take a note of these Database IDs

https://www.notion.so/myworkspace/a8aec43384f447ed84390e8e42c2e089?v=...
                                  |--------- Database ID --------|

Script Usage

  1. Clone the repo
git clone https://github.com/ashleymavericks/notion-habit-tracker.git
  1. Create a .env file in the project folder
  2. Add NOTION_HABIT_DB, NOTION_ANALYTICS_DB and NOTION_SECRET_KEY in .env file
NOTION_SECRET_KEY=PASTE_KEY_HERE
NOTION_HABIT_DB=PASTE_KEY_HERE
NOTION_ANALYTICS_DB=PASTE_KEY_HERE
  1. Install project dependencies
pipenv install
  1. Run the Script called main.py, it may take some time to complete
python3 main.py
  1. Due to Notion API rate throttling, the script might not able to remove a huge number of previous year records at once, in that scenario kindly run remove_page.py until all records get purged
python3 remove_page.py

Contributing

Feel free to reach out, if you want to further improve the template.

License

This project is licensed under the MIT license

notion-habit-tracker's People

Contributors

ashleymavericks avatar imgbotapp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

notion-habit-tracker's Issues

Notion Tracker

<style> table { border-collapse: collapse; width: 100%; max-width: 600px; margin: 0 auto; }

th, td {
border: 1px solid #ccc;
padding: 8px;
text-align: center;
}

th {
background-color: #f2f2f2;
}

.key {
display: flex;
justify-content: space-between;
max-width: 300px;
margin: 20px auto;
}

.emotion {
display: flex;
align-items: center;
}

.color-box {
width: 20px;
height: 20px;
margin-right: 5px;
}

.mood-box {
cursor: pointer;
}
</style>

Mood Tracker

Happy
Excited
Calm
Content
Sad
Angry
Neutral
Confused
Day 1 Day 2
January
February
<script> const moodBoxes = document.querySelectorAll('.mood-box'); const emotions = ['#FF5733', '#FFC300', '#4CAF50', '#3498DB', '#9B59B6', '#E74C3C', '#95A5A6', '#2C3E50']; moodBoxes.forEach(box => { box.addEventListener('click', () => { const selectedColor = prompt('Select a color for your mood:', emotions.join(', ')); if (selectedColor && emotions.includes(selectedColor)) { box.style.backgroundColor = selectedColor; } }); }); </script>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.