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 timestampTYPE- Workout type code (37=Run, 52=Walk, 50=Weightlifting)DIST- Distance in metersDUR- Duration in secondsSTEPS- Step countTITLE- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wkt_parser-1.0.1.tar.gz.
File metadata
- Download URL: wkt_parser-1.0.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dedfd676af3b1d6f127f5718a1958250af8d0b0ce0e90ba84a22f82dbeb5eb66
|
|
| MD5 |
1a54f9fe0e11fd735743c20825ce2aa2
|
|
| BLAKE2b-256 |
bc7f144b965b3d2ec96a27c88ad64da2f93af9a4e602c87779daec19d92c05e8
|
File details
Details for the file wkt_parser-1.0.1-py3-none-any.whl.
File metadata
- Download URL: wkt_parser-1.0.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c172c93e777571ef6f9de0ea89366dc13b8e560875ca09c3547ba9cefe477d1
|
|
| MD5 |
429a1cf16844664f9737807ad1110d58
|
|
| BLAKE2b-256 |
e228962f0f8d026ad05a3e02fb0787b8a5e2a4dce1a40dbefdc9c078291688b4
|