This Habit Tracking Application allows users to create, manage, and analyze their daily and weekly habits through a command-line interface.
- Clone the repository or download the source code.
- Ensure you have Python 3.7 or later installed.
- Install required packages:
pip install -r requirements.txt
python main.py
python main.py create --name "Exercise" --periodicity "daily"
python main.py complete --name "Exercise"
List all habits:
python main.py list
List habits filtered by periodicity:
python main.py list --periodicity "daily"
python main.py delete --name "Exercise"
Get the habit with the longest streak:
python main.py analyze --longest-streak
Get the longest streak for a specific habit:
python main.py analyze --habit-streak "Exercise"
The application comes with 5 predefined habits. To load them, ensure the database is initialized, and the habits are inserted into the database.
Navigate to the project's root directory and run:
python -m unittest discover tests