ryushida / habitext

Create PDF Reports of your Habits from Plain Text Markdown Files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

habitext

Habitext is a habit tracking tool that generates PDF reports from habit data in markdown files.

Example PDF

Habit Format

Habits are in the following format in a directory.

habit folder
∟ 01_habit1.md
∟ 02_habit2.md

The file name can by anything, but the order of the habits in the PDF is determined by the order of the files in the folder.

01_habit1.md

# Metadata

Name: Habit1
Goal: Goal for habit1

# Log

- MMMM-DD-YY
  - Note1
    - HH:MM
- MMMM-DD-YY
  - Note2
    - HH:MM
  - Note3
    - HH:MM
  - Note4
    - HH:MM

Usage

Local

  1. Install python 3 and pip
  2. Install required packages
pip install pandas plotnine reportlab
  1. Clone Repository
git clone https://github.com/ryushida/habitext.git
  1. Update configuration in config.ini
  2. Run script
cd habitext
python habitext.py

Docker

  1. Install Docker
  2. Clone and update settings
git clone https://github.com/ryushida/habitext.git
  1. Update configuration in config.ini
  2. Build Docker Container
cd habitext
docker build -t habitext .
  1. Run script in Docker Container
# Replace C:\Directory\of\habits with local directory where you store the .md files
docker run -it -v C:\Directory\of\habits:/habits/ habitext

You may need to set the timezone for the container. One way is by replacing the 'TZ database name' in the following command. Get your timezone from the 'TZ database name' column in the list of tz database time zones.

docker run --rm -it -v C:\Files\Repos\habits:/habits/ -e "TZ='TZ database name'" habitext

About

Create PDF Reports of your Habits from Plain Text Markdown Files


Languages

Language:Python 98.1%Language:Dockerfile 1.9%