- Python 93.7%
- Shell 6.3%
|
|
||
|---|---|---|
| .gitignore | Initial commit | |
| convert.py | Initial commit | |
| favicon.svg | Added favicon and title | |
| happy | Updated default year to current | |
| happy.py | Added glyph hovering | |
| LICENSE.md | Initial commit | |
| preview01.jpg | Initial commit | |
| preview02.jpg | Initial commit | |
| README.md | Initial commit | |
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
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.