Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Apple Health #47

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

oefe
Copy link
Contributor

@oefe oefe commented Dec 23, 2019

Add support for export files from Apple Health, to display tracks e.g. recorded with Apple Watch

This requires, and includes my previous PR #46

Add support for GPS Exchange Format files
https://en.wikipedia.org/wiki/GPS_Exchange_Format

This implementation looks only for tracks,
and expects that all track points have a
valid latitude, longitude, and time.
I.e., to display Apple Watch track data
"""
with zipfile.ZipFile(file_name) as zip_file:
namelist = zip_file.namelist()
all_routes = fnmatch.filter(namelist, "apple_health_export/workout-routes/*.gpx")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this path shouldn't be hard coded if it changes in the future.

"""
with zipfile.ZipFile(file_name) as zip_file:
namelist = zip_file.namelist()
if fnmatch.filter(namelist, "Takeout/*.html"):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really like that the files are detected by their names. Can't we detect them with file and say html is google and xml is apple or something like that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants