Skip to main content

A completely unofficial parser for the .wkt files produced by the WorkOutDoors app.

Project description

WorkOutDoors WKT Parser

An unofficial parser for the .wkt files created by WorkOutDoors App.

About

This library parses binary workout files from the WorkOutDoors app and provides structured access to workout data including GPS tracks, heart rate, cadence, laps, and more. It supports JSON export for further analysis or integration with other tools.

Note: This is an unofficial, reverse-engineered parser. The .wkt format is undocumented and may change without notice in future app releases.

Features

  • Parse Run, Walk, and Weightlifting workouts
  • GPS track extraction with coordinate conversion
  • Heart rate data including zones and samples
  • Cadence data with samples
  • Lap-by-lap analysis for multi-lap workouts
  • App and device version information
  • JSON export (to_dict(), to_json(), save_json())
  • Comprehensive error handling

Installation

pip install -e .

Usage

Basic Parsing

from pathlib import Path
from wkt_parser import WKTParser

parser = WKTParser()
workout = parser.parse(Path("path/to/workout.wkt"))

print(f"Type: {workout.workout_type_code}")
print(f"Distance: {workout.distance}m")
print(f"Duration: {workout.duration}s")
print(f"GPS points: {len(workout.gps_track)}")

JSON Export

# Export to JSON string
json_str = workout.to_json()

# Save to file
workout.save_json("workout.json")

# Get as dictionary
data = workout.to_dict()

Batch Export

See examples/export_to_json.py for a complete example of batch processing multiple workout files.

python examples/export_to_json.py ~/workouts/Workouts ~/workouts/json

Development

Setup

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # or `.venv\Scripts\activate` on Windows

# Install dependencies
pip install -e .

Testing

# Run tests
just test

# Or directly with pytest
pytest tests/

Linting

just check  # Run all checks (ruff, mypy)
just lint   # Ruff linting only

File Format

WorkOutDoors stores workout data in binary .wkt files with the following filename format:

YYMMDDHHMMSS_TYPE_DIST_DUR_F5_F6_STEPS_F8[_TITLE].wkt

Where:

  • YYMMDDHHMMSS - End timestamp
  • TYPE - Workout type code (37=Run, 52=Walk, 50=Weightlifting)
  • DIST - Distance in meters
  • DUR - Duration in seconds
  • STEPS - Step count
  • TITLE - Optional custom title

Contributing

This is primarily a personal project, but contributions are welcome. The .wkt format is undocumented and largely reverse-engineered, so discoveries about the binary structure are particularly valuable.

License

AGPL 3.0 - See LICENSE file for details

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wkt_parser-1.0.0.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wkt_parser-1.0.0-py3-none-any.whl (22.3 kB view details)

Uploaded Python 3

File details

Details for the file wkt_parser-1.0.0.tar.gz.

File metadata

  • Download URL: wkt_parser-1.0.0.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.13.5 Linux/6.12.63+deb13-amd64

File hashes

Hashes for wkt_parser-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4b1ec6706bf889297374fd9316271d38789fc4a7352e55e78de97f92c584b03c
MD5 60cadf1a9312ccdd31bed78315e3b194
BLAKE2b-256 36446deaaff13a604994d0dc9ab0fd247cebc62a4c2999d02d2f1b524e318499

See more details on using hashes here.

File details

Details for the file wkt_parser-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: wkt_parser-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 22.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.13.5 Linux/6.12.63+deb13-amd64

File hashes

Hashes for wkt_parser-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5ac1c1c710c539ce53cdfcbd49214a32c534a6a04f6f6010ddaf7d70830f3674
MD5 574cc5d45262d375fd9d02683a3e3a39
BLAKE2b-256 0596a3f2d223df30e1e5546c316c999006aab96382f326ca2e1c0855a708e952

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page