oura-to-runalyze

command module
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2022 License: MIT Imports: 10 Imported by: 0

README

Oura to Runalyze

Tests Status Badge

Sync health data from Oura to Runalyze. Currently only sleep data and resting heart rate as this normally lowest during sleep. The Runalyze Sleep Quality metric is calculated by taking the Oura Sleep Score, dividing by 10 and rounding down.

Installation

Download a binary from the releases page, or run go get github.com/lildude/oura-to-runalyze.

Usage

Obtain an access token from both Oura and Runalyze and set OURA_ACCESS_TOKEN and RUNALYZE_ACCESS_TOKEN environment variables respectively.

$ export OURA_ACCESS_TOKEN="secret1" 
$ export RUNALYZE_ACCESS_TOKEN="secret2"

You can also set these via a .env file in the current directory.

You're now ready to start synchronising.

Usage:
  -start string
        Start date in the format: YYYY-MM-DD. If not provided, defaults to Oura's default of one week ago.
  -end string
        End date in the form: YYYY-MM-DD. If not provided, defaults to Oura's default of today.
  -yesterday
        Use yesterday's date as the start date.
  -version
        Print the version and exit.

Sync the last week using Oura's defaults:

$ oura-to-runalyze
Successfully sync'd to Runalyze
$

Sync just last night's sleep:

$ oura-to-runalyze -yesterday
Successfully sync'd to Runalyze
$

Sync a range of dates:

$ oura-to-runalyze -start 2020-01-01 -end 2020-03-31
Successfully sync'd to Runalyze
$

Releasing

This project uses GoReleaser via GitHub Actions to make the releases quick and easy. When I'm ready for a new release, I push a new tag and the workflow takes care of things.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL