2
2
Fork
You've already forked happyNotHappy
0
A small mood tracker
  • Python 93.7%
  • Shell 6.3%
2026年01月06日 08:18:34 +02:00
.gitignore Initial commit 2025年05月15日 05:59:19 +02:00
convert.py Initial commit 2025年05月15日 05:59:19 +02:00
favicon.svg Added favicon and title 2025年05月18日 10:28:49 +02:00
happy Updated default year to current 2026年01月06日 08:17:49 +02:00
happy.py Added glyph hovering 2026年01月06日 08:18:34 +02:00
LICENSE.md Initial commit 2025年05月15日 05:59:19 +02:00
preview01.jpg Initial commit 2025年05月15日 05:59:19 +02:00
preview02.jpg Initial commit 2025年05月15日 05:59:19 +02:00
README.md Initial commit 2025年05月15日 05:59:19 +02:00

Happy Not Happy Preview Image

Happy Not Happy

Happy Not Happy is a mood tracker inspired by Rek Bellum.
The script reads a file called HappyNotHappy.log and generates the output.

Setup

Open a terminal and cd to the location you would like to download the script to.
Use git pull https://git.sr.ht/~rostiger/happyNotHappy to download the repository - it will create a new directory called happyNotHappy. Enter the directory using cd happyNotHappy.
Make sure happy is executable by using chmod +x happy.
Create a log file at a location of your choosing using touch $HOME/path/to/log/file//happyNotHappy.log.

Configuration

To configure the script you have to edit the first lines of the script itself.
Use you preferred text editor to edit happy - in my case micro - micro happy
Most configuration options should be self-explanatory.
Change LOCAL_ROOT to the path you downloaded the repository to.

You can change or add moods in the MOODS array.
If you do, make sure there are a corresponding number of colors in the COLORS array.

Extra
You can create a symbolic link of the script make it accessible outside the repository directory: ln -s $HOME/path/to/repository/happy $HOME/.local/bin/happy

Usage

Each line in happyNotHappy.log is parsed as an entry. E.g.:

241001 happy tired | ❣❣❂☯

You can add a maximum of two moods per entry and any number of glyphs after the pipe symbol |.

Dates must be in the order of year/month/day. The following date formats are possible:

2024年05月28日
2024年05月28日
20240528
24-05-28
240528

Experimental branch

Happy Not Happy Preview Image

Since its conception I switched to a different tracking method and visualization that can be found on the experimental branch.
Instead of adding two moods per day, I add four numbers representing four categories: Mood, Energy, Health and Stress.
Each category has a number between 0 and 2. 0 represents good, 1 neutral, and 2 bad.
This creates a range of averages between 0 and 8, which are color coded in the squares of the output.

Generating the output

To generate the index.html you must execute the script. If you added a symlink, you can just execute happy in your terminal, otherwise you must enter the repository directory and execute ./happy.

To open the output after building use happy -o. To view the script argument options use happy -h.

Glyphs

Use optional glyphs to track recurring activities, such as workouts, cooking, meditation, etc. Each symbol will be counted individually and added to the total number at the top of the page.

License

See the License file for license rights and limitations (MIT).

Caveat

This script was written to suit my personal purposes.

I am an hobbyist programmer and positively consider myself as someone who doesn't have a proper clue what he is doing.
Use this script with care and at your own risk. Bug reports or notifications of security concerns are welcome.