Skip to content

A simple Python utility that connects to the Exist.io API and generates a weekly HTML report about your tracked attributes.

License

Notifications You must be signed in to change notification settings

valzietine/existscript

Repository files navigation

ExistScript

A simple Python utility that connects to the Exist.io API and generates a weekly HTML report about your tracked attributes.

Requirements

  • Python 3.8+
  • The requests library
  • See requirements.txt for Python dependencies

Setup

  1. Clone this repository.

  2. Install dependencies:

    pip install -r requirements.txt
  3. Export your Exist.io API token as the EXIST_TOKEN environment variable before running the script.

Usage

Run the script using Python:

python exist.py

The script fetches data from Exist.io and creates weekly_report.html in the current directory.

Configuration

Configuration values such as attributes to fetch, the report period, and styling options are defined in existscript/config.py. Adjust them as needed.

Mood Images

The HTML report displays an image for each daily mood entry. These images are configured by the MOOD_IMAGES dictionary in existscript/config.py, which maps mood values (1–9) to image paths. The repository now includes a set of Daylio-style mood icons in images/daylio/. The default paths in MOOD_IMAGES already point to these files. You can replace them with your own local or remote images to customize the look of the report.

Output

Open weekly_report.html in a web browser to view your weekly summary.

Testing

This project uses pytest for unit testing and flake8 for linting.

Running the Tests

  1. Install dependencies from requirements.txt:

    pip install -r requirements.txt
  2. Run the test suite from the repository root:

    pytest

The tests are located in the tests/ directory. They stub the requests module so no network access is required.

Linting

To check code style using flake8:

flake8

About

A simple Python utility that connects to the Exist.io API and generates a weekly HTML report about your tracked attributes.

Topics

Resources

License

Stars

Watchers

Forks