Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

There's an old proverb that says just about whatever you want it to.


aus+uk / uk.comp.sys.mac / Re: Tool to parse Apple Health data

SubjectAuthor
* Tool to parse Apple Health dataChris
+* Re: Tool to parse Apple Health databadgolferman
|`* Re: Tool to parse Apple Health dataChris
| `- Re: Tool to parse Apple Health dataJolly Roger
+* Re: Tool to parse Apple Health datajeremy
|`* Re: Tool to parse Apple Health dataJolly Roger
| `* Re: Tool to parse Apple Health datajeremy
|  `- Re: Tool to parse Apple Health dataJolly Roger
`* Re: Tool to parse Apple Health dataJolly Roger
 `* Re: Tool to parse Apple Health dataChris
  +* Re: Tool to parse Apple Health dataJolly Roger
  |`* Re: Tool to parse Apple Health dataChris
  | +* Re: Tool to parse Apple Health dataJolly Roger
  | |`- Re: Tool to parse Apple Health dataChris
  | `* Re: Tool to parse Apple Health dataMark Bestley
  |  `- Re: Tool to parse Apple Health dataChris Ridd
  `* Re: Tool to parse Apple Health dataJolly Roger
   +- Re: Tool to parse Apple Health dataChris
   `- Re: Tool to parse Apple Health dataMark Bestley

1
Tool to parse Apple Health data

<tkvjrg$21bdc$1@dont-email.me>

  copy mid

https://www.novabbs.com/aus+uk/article-flat.php?id=11870&group=uk.comp.sys.mac#11870

  copy link   Newsgroups: misc.phone.mobile.iphone uk.comp.sys.mac
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ithink...@gmail.com (Chris)
Newsgroups: misc.phone.mobile.iphone,uk.comp.sys.mac
Subject: Tool to parse Apple Health data
Date: Tue, 15 Nov 2022 08:49:52 +0000
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <tkvjrg$21bdc$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 15 Nov 2022 08:49:52 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="ea96ed5b13fa38d8c4d01f53c556e612";
logging-data="2141612"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/miDcUdik2eorN650T34mJ0PmvFj+F1PA="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)
Gecko/20100101 Thunderbird/102.4.1
Cancel-Lock: sha1:wejTiCq6Wa4K4TtQDZUKJrVqfNQ=
Content-Language: en-GB
 by: Chris - Tue, 15 Nov 2022 08:49 UTC

I've exported my health data from the Health App, but it's in a horribly
mangled XML file. Are their any offline tools for reading the file and
export to a more sensible format? I could write my own, but I can't be
the only one who wants to do this. Had a google and couldn't find
anything obvious.

I've seen the HealthView app and others but they either don't do what I
want or cost quite a lot of money to just export the data. Hence the
request for an offline tool.

Thanks!

Re: Tool to parse Apple Health data

<xn0npdunu5qdlf7001@reader443.eternal-september.org>

  copy mid

https://www.novabbs.com/aus+uk/article-flat.php?id=11875&group=uk.comp.sys.mac#11875

  copy link   Newsgroups: misc.phone.mobile.iphone uk.comp.sys.mac
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: REMOVETH...@gmail.com (badgolferman)
Newsgroups: misc.phone.mobile.iphone,uk.comp.sys.mac
Subject: Re: Tool to parse Apple Health data
Date: Tue, 15 Nov 2022 15:11:53 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <xn0npdunu5qdlf7001@reader443.eternal-september.org>
References: <tkvjrg$21bdc$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 15 Nov 2022 15:11:53 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="dd3f2e8f5179f3826c924a70709c0d3a";
logging-data="2201386"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/w3vWW6cdYdK3B6Bkk1BpM5jt7UN7kJGw="
User-Agent: XanaNews/1.19.1.372 (x86; Portable ISpell)
Cancel-Lock: sha1:h3823gvv/Jcn4dhTDhBAdp/abEs=
X-Ref: reader443.eternal-september.org ~XNS:0000267A
X-Face: 09>j%-W3HnyolA\I${DXfUw}~nKyLDiU8IwUVM'`
 by: badgolferman - Tue, 15 Nov 2022 15:11 UTC

Chris wrote:

>
>I've exported my health data from the Health App, but it's in a
>horribly mangled XML file. Are their any offline tools for reading
>the file and export to a more sensible format? I could write my own,
>but I can't be the only one who wants to do this. Had a google and
>couldn't find anything obvious.
>
>I've seen the HealthView app and others but they either don't do what
>I want or cost quite a lot of money to just export the data. Hence
>the request for an offline tool.
>
>Thanks!

I think Microsoft Edge is able to display XML in a way which is human
readble.

Re: Tool to parse Apple Health data

<jthtguF82gpU1@mid.individual.net>

  copy mid

https://www.novabbs.com/aus+uk/article-flat.php?id=11882&group=uk.comp.sys.mac#11882

  copy link   Newsgroups: misc.phone.mobile.iphone uk.comp.sys.mac
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.szaf.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: jeremy0...@gmail.com (jeremy)
Newsgroups: misc.phone.mobile.iphone,uk.comp.sys.mac
Subject: Re: Tool to parse Apple Health data
Date: 15 Nov 2022 16:36:46 GMT
Lines: 27
Message-ID: <jthtguF82gpU1@mid.individual.net>
References: <tkvjrg$21bdc$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net Tafg/ECbTxdL5k0ZYxqJRgyATgzRG8K6rWrn1AXNoyVUCvVg+A
Cancel-Lock: sha1:Tl8Gsn4fRtYBCWzZ3YlEXVUhXkY=
User-Agent: Usenapp for MacOS
X-Usenapp: v1.24/d - Full License
 by: jeremy - Tue, 15 Nov 2022 16:36 UTC

On 15 Nov 2022 at 08:49:52 GMT, "Chris" <ithinkiam@gmail.com> wrote:

>
> I've exported my health data from the Health App, but it's in a horribly
> mangled XML file. Are their any offline tools for reading the file and
> export to a more sensible format? I could write my own, but I can't be
> the only one who wants to do this. Had a google and couldn't find
> anything obvious.
>
> I've seen the HealthView app and others but they either don't do what I
> want or cost quite a lot of money to just export the data. Hence the
> request for an offline tool.
>
> Thanks!

I came across exactly this - I wanted to track my weight in a spreadsheet -
had been adding it into the phone daily. The XML was quite horrible, couldn't
open it in Excel directly so looked at the content, worked out the strings I
was seeking and then "grep"'d them out, used a bit of "cut" and something to
join lines (forget what, some kind of digital sellotape I suppose) (which was
required as i think the date and weight were on different lines) and then had
a fixed-width set of data I could open within Excel and then save and work
with going forward.

Fun in a geeky sort of way. Time-consuming hassle in the eyes of most!
--
jeremy

Re: Tool to parse Apple Health data

<jti22eF8gv5U6@mid.individual.net>

  copy mid

https://www.novabbs.com/aus+uk/article-flat.php?id=11883&group=uk.comp.sys.mac#11883

  copy link   Newsgroups: misc.phone.mobile.iphone uk.comp.sys.mac
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!news.szaf.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: jollyro...@pobox.com (Jolly Roger)
Newsgroups: misc.phone.mobile.iphone,uk.comp.sys.mac
Subject: Re: Tool to parse Apple Health data
Date: 15 Nov 2022 17:54:22 GMT
Organization: People for the Ethical Treatment of Pirates
Lines: 103
Message-ID: <jti22eF8gv5U6@mid.individual.net>
References: <tkvjrg$21bdc$1@dont-email.me>
X-Trace: individual.net VjzubdOmQS4LohApek/VxAF1d1A6h6H/sWu0foHMJ+UDnB1TY+
Cancel-Lock: sha1:ar70eJ9QRhNY8U2mVh8I26GWxDw=
Mail-Copies-To: nobody
X-Face: _.g>n!a$f3/H3jA]>9pN55*5<`}Tud57>1<n@LQ!aZ7vLO_nWbK~@T'XIS0,oAJcU.qLM
dk/j8Udo?O"o9B9Jyx+ez2:B<nx(k3EdHnTvB]'eoVaR495,Rv~/vPa[e^JI+^h5Zk*i`Q;ezqDW<
ZFs6kmAJWZjOH\8[$$7jm,Ogw3C_%QM'|H6nygNGhhl+@}n30Nz(^vWo@h>Y%b|b-Y~()~\t,LZ3e
up1/bO{=-)
User-Agent: slrn/1.0.3 (Darwin)
 by: Jolly Roger - Tue, 15 Nov 2022 17:54 UTC

On 2022-11-15, Chris <ithinkiam@gmail.com> wrote:
>
> I've exported my health data from the Health App, but it's in a
> horribly mangled XML file.

The XML isn't mangled - it's completely valid XML. ; )

> Are their any offline tools for reading the file and export to a more
> sensible format? I could write my own, but I can't be the only one who
> wants to do this. Had a google and couldn't find anything obvious.

I did just that (wrote my own) earlier this year to grab my blood
pressure records from it. I wrote it in Ruby using the nokogiri gem to
parse the XML, and it was relatively easy to grab the records I wanted.
The relevant methods are:

---
def parse_apple_health_xml_file(filepath)
document = nil

contents = IO.read(filepath, chomp: false)
begin
document = Nokogiri::XML(contents)
rescue StandardError => exception
puts "ERROR: Could not parse #{filename} due to exception: #{exception.message}"
end

document
end

def get_blood_pressure_records(document)
records = Array.new

nodes = document.xpath("//HealthData/Record[contains(@type,'BloodPressure')]")
nodes.each_with_index do |node, index|
type = node['type'][/HKQuantityTypeIdentifierBloodPressure(Diastolic|Systolic)/, 1]
unit = node['unit']
date = node['creationDate']
value = node['value']

existing_record = records.select {|r| r[:date] == date}.first
if existing_record.nil?
record = {:date => date, :unit => unit, type.downcase.to_sym => value}
records << record
else
existing_record[type.downcase.to_sym] = value
end
end

records.sort_by!{|r| r[:date]}
end
---

The resulting records array of hashes look like this:

---
[ ....
[44] {
:date => "2022-09-07 09:15:40 -0700",
:unit => "mmHg",
:systolic => "120",
:diastolic => "88"
},
[45] {
:date => "2022-09-08 10:31:27 -0700",
:unit => "mmHg",
:systolic => "129",
:diastolic => "87"
},
[46] {
:date => "2022-09-09 10:01:00 -0700",
:unit => "mmHg",
:systolic => "122",
:diastolic => "86"
}
] ---

So you can print out:

---
2022-09-07 09:15:40 -0700: S: 120 mmHg D: 88 mmHg
2022-09-08 10:31:27 -0700: S: 129 mmHg D: 87 mmHg
2022-09-09 10:01:00 -0700: S: 122 mmHg D: 86 mmHg
---

Pretty simple, really. Just change the XPath to get whatever you want,
and collect the information in a records array that suits your needs.

> I've seen the HealthView app and others but they either don't do what I
> want or cost quite a lot of money to just export the data. Hence the
> request for an offline tool.
>
> Thanks!

I'm not aware of any general-purpose tool for this, sorry.

--
E-mail sent to this address may be devoured by my ravenous SPAM filter.
I often ignore posts from Google. Use a real news client instead.

JR

Re: Tool to parse Apple Health data

<jti279F8gv5U7@mid.individual.net>

  copy mid

https://www.novabbs.com/aus+uk/article-flat.php?id=11884&group=uk.comp.sys.mac#11884

  copy link   Newsgroups: misc.phone.mobile.iphone uk.comp.sys.mac
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: jollyro...@pobox.com (Jolly Roger)
Newsgroups: misc.phone.mobile.iphone,uk.comp.sys.mac
Subject: Re: Tool to parse Apple Health data
Date: 15 Nov 2022 17:56:57 GMT
Organization: People for the Ethical Treatment of Pirates
Lines: 40
Message-ID: <jti279F8gv5U7@mid.individual.net>
References: <tkvjrg$21bdc$1@dont-email.me> <jthtguF82gpU1@mid.individual.net>
X-Trace: individual.net e5pRHEoTtHU3EkSC7fGjQgOQ9Zw0xOL5reWOyVyXu6tDcZhFR4
Cancel-Lock: sha1:mh+tPZEvan2zblbQ96l16llFQOc=
Mail-Copies-To: nobody
X-Face: _.g>n!a$f3/H3jA]>9pN55*5<`}Tud57>1<n@LQ!aZ7vLO_nWbK~@T'XIS0,oAJcU.qLM
dk/j8Udo?O"o9B9Jyx+ez2:B<nx(k3EdHnTvB]'eoVaR495,Rv~/vPa[e^JI+^h5Zk*i`Q;ezqDW<
ZFs6kmAJWZjOH\8[$$7jm,Ogw3C_%QM'|H6nygNGhhl+@}n30Nz(^vWo@h>Y%b|b-Y~()~\t,LZ3e
up1/bO{=-)
User-Agent: slrn/1.0.3 (Darwin)
 by: Jolly Roger - Tue, 15 Nov 2022 17:56 UTC

On 2022-11-15, jeremy <jeremy0505@gmail.com> wrote:
> On 15 Nov 2022 at 08:49:52 GMT, "Chris" <ithinkiam@gmail.com> wrote:
>
>> I've exported my health data from the Health App, but it's in a
>> horribly mangled XML file. Are their any offline tools for reading
>> the file and export to a more sensible format? I could write my own,
>> but I can't be the only one who wants to do this. Had a google and
>> couldn't find anything obvious.
>>
>> I've seen the HealthView app and others but they either don't do what
>> I want or cost quite a lot of money to just export the data. Hence
>> the request for an offline tool.
>>
>> Thanks!
>
> I came across exactly this - I wanted to track my weight in a
> spreadsheet - had been adding it into the phone daily. The XML was
> quite horrible

I'm not sure why you guys think anything is wrong with the XML. It's
completely valid and easily parsed...

> couldn't open it in Excel directly so looked at the content, worked
> out the strings I was seeking and then "grep"'d them out, used a bit
> of "cut" and something to join lines (forget what, some kind of
> digital sellotape I suppose) (which was required as i think the date
> and weight were on different lines) and then had a fixed-width set of
> data I could open within Excel and then save and work with going
> forward.
>
> Fun in a geeky sort of way. Time-consuming hassle in the eyes of most!

It's *much* easier when you use an XML parsing library. See my previous
reply.

--
E-mail sent to this address may be devoured by my ravenous SPAM filter.
I often ignore posts from Google. Use a real news client instead.

JR

Re: Tool to parse Apple Health data

<tl0oj2$24c01$1@dont-email.me>

  copy mid

https://www.novabbs.com/aus+uk/article-flat.php?id=11886&group=uk.comp.sys.mac#11886

  copy link   Newsgroups: uk.comp.sys.mac misc.phone.mobile.iphone
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ithink...@gmail.com (Chris)
Newsgroups: uk.comp.sys.mac,misc.phone.mobile.iphone
Subject: Re: Tool to parse Apple Health data
Date: Tue, 15 Nov 2022 19:16:50 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <tl0oj2$24c01$1@dont-email.me>
References: <tkvjrg$21bdc$1@dont-email.me>
<xn0npdunu5qdlf7001@reader443.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 15 Nov 2022 19:16:50 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="ea96ed5b13fa38d8c4d01f53c556e612";
logging-data="2240513"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+bXUXUDns31f04kJjq9JR0KtW7mUmboco="
User-Agent: NewsTap/5.5 (iPhone/iPod Touch)
Cancel-Lock: sha1:/h6ZusZvx4yNHpcxVw5/y6U17bY=
sha1:AIRO471T3vozzp8gGx3ubhu9zos=
 by: Chris - Tue, 15 Nov 2022 19:16 UTC

badgolferman <REMOVETHISbadgolferman@gmail.com> wrote:
> Chris wrote:
>
>>
>> I've exported my health data from the Health App, but it's in a
>> horribly mangled XML file. Are their any offline tools for reading
>> the file and export to a more sensible format? I could write my own,
>> but I can't be the only one who wants to do this. Had a google and
>> couldn't find anything obvious.
>>
>> I've seen the HealthView app and others but they either don't do what
>> I want or cost quite a lot of money to just export the data. Hence
>> the request for an offline tool.
>>
>> Thanks!
>
> I think Microsoft Edge is able to display XML in a way which is human
> readble.

Firefox can too, but not this file.

Re: Tool to parse Apple Health data

<tl0pb0$24dpv$1@dont-email.me>

  copy mid

https://www.novabbs.com/aus+uk/article-flat.php?id=11887&group=uk.comp.sys.mac#11887

  copy link   Newsgroups: uk.comp.sys.mac misc.phone.mobile.iphone
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ithink...@gmail.com (Chris)
Newsgroups: uk.comp.sys.mac,misc.phone.mobile.iphone
Subject: Re: Tool to parse Apple Health data
Date: Tue, 15 Nov 2022 19:29:36 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 97
Message-ID: <tl0pb0$24dpv$1@dont-email.me>
References: <tkvjrg$21bdc$1@dont-email.me>
<jti22eF8gv5U6@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 15 Nov 2022 19:29:36 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="ea96ed5b13fa38d8c4d01f53c556e612";
logging-data="2242367"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1//LkqaE2jp33Ygz0865JI9xM9H1zNtArQ="
User-Agent: NewsTap/5.5 (iPhone/iPod Touch)
Cancel-Lock: sha1:8pRed0tgtHMiO6yAB3GUjko/6xM=
sha1:iKTr7Ni09iSnlSmYH7HrRGLWDyU=
 by: Chris - Tue, 15 Nov 2022 19:29 UTC

Jolly Roger <jollyroger@pobox.com> wrote:
> On 2022-11-15, Chris <ithinkiam@gmail.com> wrote:
>>
>> I've exported my health data from the Health App, but it's in a
>> horribly mangled XML file.
>
> The XML isn't mangled - it's completely valid XML. ; )
>
>> Are their any offline tools for reading the file and export to a more
>> sensible format? I could write my own, but I can't be the only one who
>> wants to do this. Had a google and couldn't find anything obvious.
>
> I did just that (wrote my own) earlier this year to grab my blood
> pressure records from it. I wrote it in Ruby using the nokogiri gem to
> parse the XML, and it was relatively easy to grab the records I wanted.
> The relevant methods are:
>
> ---
> def parse_apple_health_xml_file(filepath)
> document = nil
>
> contents = IO.read(filepath, chomp: false)
> begin
> document = Nokogiri::XML(contents)
> rescue StandardError => exception
> puts "ERROR: Could not parse #{filename} due to exception: #{exception.message}"
> end
>
> document
> end
>
> def get_blood_pressure_records(document)
> records = Array.new
>
> nodes = document.xpath("//HealthData/Record[contains(@type,'BloodPressure')]")
> nodes.each_with_index do |node, index|
> type = node['type'][/HKQuantityTypeIdentifierBloodPressure(Diastolic|Systolic)/, 1]
> unit = node['unit']
> date = node['creationDate']
> value = node['value']
>
> existing_record = records.select {|r| r[:date] == date}.first
> if existing_record.nil?
> record = {:date => date, :unit => unit, type.downcase.to_sym => value}
> records << record
> else
> existing_record[type.downcase.to_sym] = value
> end
> end
>
> records.sort_by!{|r| r[:date]}
> end
> ---
>
> The resulting records array of hashes look like this:
>
> ---
> [
> ...
> [44] {
> :date => "2022-09-07 09:15:40 -0700",
> :unit => "mmHg",
> :systolic => "120",
> :diastolic => "88"
> },
> [45] {
> :date => "2022-09-08 10:31:27 -0700",
> :unit => "mmHg",
> :systolic => "129",
> :diastolic => "87"
> },
> [46] {
> :date => "2022-09-09 10:01:00 -0700",
> :unit => "mmHg",
> :systolic => "122",
> :diastolic => "86"
> }
> ]
> ---
>
> So you can print out:
>
> ---
> 2022-09-07 09:15:40 -0700: S: 120 mmHg D: 88 mmHg
> 2022-09-08 10:31:27 -0700: S: 129 mmHg D: 87 mmHg
> 2022-09-09 10:01:00 -0700: S: 122 mmHg D: 86 mmHg
> ---
>
> Pretty simple, really. Just change the XPath to get whatever you want,
> and collect the information in a records array that suits your needs.
>

Thanks. That's really useful. Should be able to get a python script to do
something similar. I just don't have the time at the moment and need to
drop off my bp readings at the GP.

This should be easier than having to write your own code.

Re: Tool to parse Apple Health data

<jtibv3Fa5nvU1@mid.individual.net>

  copy mid

https://www.novabbs.com/aus+uk/article-flat.php?id=11888&group=uk.comp.sys.mac#11888

  copy link   Newsgroups: uk.comp.sys.mac misc.phone.mobile.iphone
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.szaf.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: jollyro...@pobox.com (Jolly Roger)
Newsgroups: uk.comp.sys.mac,misc.phone.mobile.iphone
Subject: Re: Tool to parse Apple Health data
Date: 15 Nov 2022 20:43:15 GMT
Organization: People for the Ethical Treatment of Pirates
Lines: 28
Message-ID: <jtibv3Fa5nvU1@mid.individual.net>
References: <tkvjrg$21bdc$1@dont-email.me>
<xn0npdunu5qdlf7001@reader443.eternal-september.org>
<tl0oj2$24c01$1@dont-email.me>
X-Trace: individual.net OaDqOyKGlB5/0ZjCWQdWWAi0nO8J/Ggq9yy7teNKfgEaqhFrW8
Cancel-Lock: sha1:nLu9FTQawUz0NNAx6P+pO/1PA4A=
Mail-Copies-To: nobody
X-Face: _.g>n!a$f3/H3jA]>9pN55*5<`}Tud57>1<n@LQ!aZ7vLO_nWbK~@T'XIS0,oAJcU.qLM
dk/j8Udo?O"o9B9Jyx+ez2:B<nx(k3EdHnTvB]'eoVaR495,Rv~/vPa[e^JI+^h5Zk*i`Q;ezqDW<
ZFs6kmAJWZjOH\8[$$7jm,Ogw3C_%QM'|H6nygNGhhl+@}n30Nz(^vWo@h>Y%b|b-Y~()~\t,LZ3e
up1/bO{=-)
User-Agent: slrn/1.0.3 (Darwin)
 by: Jolly Roger - Tue, 15 Nov 2022 20:43 UTC

On 2022-11-15, Chris <ithinkiam@gmail.com> wrote:
> badgolferman <REMOVETHISbadgolferman@gmail.com> wrote:
>> Chris wrote:
>>
>>> I've exported my health data from the Health App, but it's in a
>>> horribly mangled XML file. Are their any offline tools for reading
>>> the file and export to a more sensible format? I could write my own,
>>> but I can't be the only one who wants to do this. Had a google and
>>> couldn't find anything obvious.
>>>
>>> I've seen the HealthView app and others but they either don't do what
>>> I want or cost quite a lot of money to just export the data. Hence
>>> the request for an offline tool.
>>>
>>> Thanks!
>>
>> I think Microsoft Edge is able to display XML in a way which is human
>> readble.
>
> Firefox can too, but not this file.

Probably due to its size. The file is rather huge uncompressed.

--
E-mail sent to this address may be devoured by my ravenous SPAM filter.
I often ignore posts from Google. Use a real news client instead.

JR

Re: Tool to parse Apple Health data

<jtic2rFa5nvU2@mid.individual.net>

  copy mid

https://www.novabbs.com/aus+uk/article-flat.php?id=11889&group=uk.comp.sys.mac#11889

  copy link   Newsgroups: uk.comp.sys.mac misc.phone.mobile.iphone
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.szaf.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: jollyro...@pobox.com (Jolly Roger)
Newsgroups: uk.comp.sys.mac,misc.phone.mobile.iphone
Subject: Re: Tool to parse Apple Health data
Date: 15 Nov 2022 20:45:15 GMT
Organization: People for the Ethical Treatment of Pirates
Lines: 39
Message-ID: <jtic2rFa5nvU2@mid.individual.net>
References: <tkvjrg$21bdc$1@dont-email.me>
<jti22eF8gv5U6@mid.individual.net> <tl0pb0$24dpv$1@dont-email.me>
X-Trace: individual.net EyyZ3BlKkc7ziGdx1xbrCw9l3Ig+KRlvsqaUqnMJTKBxyXviyf
Cancel-Lock: sha1:kCPz8gnlkSQ0R2OtJZyioWuEaAA=
Mail-Copies-To: nobody
X-Face: _.g>n!a$f3/H3jA]>9pN55*5<`}Tud57>1<n@LQ!aZ7vLO_nWbK~@T'XIS0,oAJcU.qLM
dk/j8Udo?O"o9B9Jyx+ez2:B<nx(k3EdHnTvB]'eoVaR495,Rv~/vPa[e^JI+^h5Zk*i`Q;ezqDW<
ZFs6kmAJWZjOH\8[$$7jm,Ogw3C_%QM'|H6nygNGhhl+@}n30Nz(^vWo@h>Y%b|b-Y~()~\t,LZ3e
up1/bO{=-)
User-Agent: slrn/1.0.3 (Darwin)
 by: Jolly Roger - Tue, 15 Nov 2022 20:45 UTC

On 2022-11-15, Chris <ithinkiam@gmail.com> wrote:
> Jolly Roger <jollyroger@pobox.com> wrote:
>> On 2022-11-15, Chris <ithinkiam@gmail.com> wrote:
>>>
>>> I've exported my health data from the Health App, but it's in a
>>> horribly mangled XML file.
>>
>> The XML isn't mangled - it's completely valid XML. ; )
>>
>>> Are their any offline tools for reading the file and export to a more
>>> sensible format? I could write my own, but I can't be the only one who
>>> wants to do this. Had a google and couldn't find anything obvious.
>>
>> I did just that (wrote my own) earlier this year to grab my blood
>> pressure records from it. I wrote it in Ruby using the nokogiri gem to
>> parse the XML, and it was relatively easy to grab the records I wanted.
>> The relevant methods are:
>>
>> (snip)
>>
>> Pretty simple, really. Just change the XPath to get whatever you want,
>> and collect the information in a records array that suits your needs.
>>
>
> Thanks. That's really useful. Should be able to get a python script to do
> something similar. I just don't have the time at the moment and need to
> drop off my bp readings at the GP.
>
> This should be easier than having to write your own code.

I suppose there's a small opportunity for someone to create an app to
parse the data and export it as CSV/whatever. I'm just not sure how many
people would be willing to purchase it.

--
E-mail sent to this address may be devoured by my ravenous SPAM filter.
I often ignore posts from Google. Use a real news client instead.

JR

Re: Tool to parse Apple Health data

<tl14s9$25bra$1@dont-email.me>

  copy mid

https://www.novabbs.com/aus+uk/article-flat.php?id=11895&group=uk.comp.sys.mac#11895

  copy link   Newsgroups: uk.comp.sys.mac misc.phone.mobile.iphone
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ithink...@gmail.com (Chris)
Newsgroups: uk.comp.sys.mac,misc.phone.mobile.iphone
Subject: Re: Tool to parse Apple Health data
Date: Tue, 15 Nov 2022 22:46:33 +0000
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <tl14s9$25bra$1@dont-email.me>
References: <tkvjrg$21bdc$1@dont-email.me> <jti22eF8gv5U6@mid.individual.net>
<tl0pb0$24dpv$1@dont-email.me> <jtic2rFa5nvU2@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 15 Nov 2022 22:46:33 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="ea96ed5b13fa38d8c4d01f53c556e612";
logging-data="2273130"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/J2kOYvdiHgDOePoHqAWbW1dUpwuu3TEU="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)
Gecko/20100101 Thunderbird/102.4.1
Cancel-Lock: sha1:5WTA50GLMxBDb3xvLoTtT5PlcPs=
In-Reply-To: <jtic2rFa5nvU2@mid.individual.net>
Content-Language: en-GB
 by: Chris - Tue, 15 Nov 2022 22:46 UTC

On 15/11/2022 20:45, Jolly Roger wrote:
> On 2022-11-15, Chris <ithinkiam@gmail.com> wrote:
>> Jolly Roger <jollyroger@pobox.com> wrote:
>>> On 2022-11-15, Chris <ithinkiam@gmail.com> wrote:
>>>>
>>>> I've exported my health data from the Health App, but it's in a
>>>> horribly mangled XML file.
>>>
>>> The XML isn't mangled - it's completely valid XML. ; )
>>>
>>>> Are their any offline tools for reading the file and export to a more
>>>> sensible format? I could write my own, but I can't be the only one who
>>>> wants to do this. Had a google and couldn't find anything obvious.
>>>
>>> I did just that (wrote my own) earlier this year to grab my blood
>>> pressure records from it. I wrote it in Ruby using the nokogiri gem to
>>> parse the XML, and it was relatively easy to grab the records I wanted.
>>> The relevant methods are:
>>>
>>> (snip)
>>>
>>> Pretty simple, really. Just change the XPath to get whatever you want,
>>> and collect the information in a records array that suits your needs.
>>>
>>
>> Thanks. That's really useful. Should be able to get a python script to do
>> something similar. I just don't have the time at the moment and need to
>> drop off my bp readings at the GP.
>>
>> This should be easier than having to write your own code.
>
> I suppose there's a small opportunity for someone to create an app to
> parse the data and export it as CSV/whatever. I'm just not sure how many
> people would be willing to purchase it.

It doesn't have to be an app. I'm more than happy with some code on
github. As I'm sure many others would be.

Re: Tool to parse Apple Health data

<jtijmvFbdl9U1@mid.individual.net>

  copy mid

https://www.novabbs.com/aus+uk/article-flat.php?id=11896&group=uk.comp.sys.mac#11896

  copy link   Newsgroups: uk.comp.sys.mac misc.phone.mobile.iphone
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!news.szaf.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: jollyro...@pobox.com (Jolly Roger)
Newsgroups: uk.comp.sys.mac,misc.phone.mobile.iphone
Subject: Re: Tool to parse Apple Health data
Date: 15 Nov 2022 22:55:27 GMT
Organization: People for the Ethical Treatment of Pirates
Lines: 16
Message-ID: <jtijmvFbdl9U1@mid.individual.net>
References: <tkvjrg$21bdc$1@dont-email.me>
<jti22eF8gv5U6@mid.individual.net> <tl0pb0$24dpv$1@dont-email.me>
X-Trace: individual.net bpZ4zjc1j3EFRcU7aB0ccwdj92LJz+3hGfLEeHAM6YMcvTFcWI
Cancel-Lock: sha1:xWzCi7fVqMhSohyZAo+ex0u/VdY=
Mail-Copies-To: nobody
X-Face: _.g>n!a$f3/H3jA]>9pN55*5<`}Tud57>1<n@LQ!aZ7vLO_nWbK~@T'XIS0,oAJcU.qLM
dk/j8Udo?O"o9B9Jyx+ez2:B<nx(k3EdHnTvB]'eoVaR495,Rv~/vPa[e^JI+^h5Zk*i`Q;ezqDW<
ZFs6kmAJWZjOH\8[$$7jm,Ogw3C_%QM'|H6nygNGhhl+@}n30Nz(^vWo@h>Y%b|b-Y~()~\t,LZ3e
up1/bO{=-)
User-Agent: slrn/1.0.3 (Darwin)
 by: Jolly Roger - Tue, 15 Nov 2022 22:55 UTC

On 2022-11-15, Chris <ithinkiam@gmail.com> wrote:
>
> I just don't have the time at the moment and need to drop off my bp
> readings at the GP.
>
> This should be easier than having to write your own code.

You may be able to share your data with your GP this way instead:

<https://support.apple.com/en-us/HT213359>

--
E-mail sent to this address may be devoured by my ravenous SPAM filter.
I often ignore posts from Google. Use a real news client instead.

JR

Re: Tool to parse Apple Health data

<tl15mc$25dmf$1@dont-email.me>

  copy mid

https://www.novabbs.com/aus+uk/article-flat.php?id=11897&group=uk.comp.sys.mac#11897

  copy link   Newsgroups: uk.comp.sys.mac misc.phone.mobile.iphone
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ithink...@gmail.com (Chris)
Newsgroups: uk.comp.sys.mac,misc.phone.mobile.iphone
Subject: Re: Tool to parse Apple Health data
Date: Tue, 15 Nov 2022 23:00:28 +0000
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <tl15mc$25dmf$1@dont-email.me>
References: <tkvjrg$21bdc$1@dont-email.me> <jti22eF8gv5U6@mid.individual.net>
<tl0pb0$24dpv$1@dont-email.me> <jtijmvFbdl9U1@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 15 Nov 2022 23:00:28 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="43c4fc522d4a6dea4690fb40eb1c4e67";
logging-data="2275023"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX196lKyjI8VV+nXTBmOeNyKY6c4Wow2Y/lM="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)
Gecko/20100101 Thunderbird/102.4.1
Cancel-Lock: sha1:iSGd030EwQFrXwMArkea9VEzcw0=
Content-Language: en-GB
In-Reply-To: <jtijmvFbdl9U1@mid.individual.net>
 by: Chris - Tue, 15 Nov 2022 23:00 UTC

On 15/11/2022 22:55, Jolly Roger wrote:
> On 2022-11-15, Chris <ithinkiam@gmail.com> wrote:
>>
>> I just don't have the time at the moment and need to drop off my bp
>> readings at the GP.
>>
>> This should be easier than having to write your own code.
>
> You may be able to share your data with your GP this way instead:
>
> <https://support.apple.com/en-us/HT213359>

The digital capabilities of frontline NHS services are chronically
out-of-date. No chance my GP is equipped to accept the data.

However, sharing requires iCloud which I haven't enabled.

Re: Tool to parse Apple Health data

<jtikp7Fbdl9U2@mid.individual.net>

  copy mid

https://www.novabbs.com/aus+uk/article-flat.php?id=11898&group=uk.comp.sys.mac#11898

  copy link   Newsgroups: uk.comp.sys.mac misc.phone.mobile.iphone
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.szaf.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: jollyro...@pobox.com (Jolly Roger)
Newsgroups: uk.comp.sys.mac,misc.phone.mobile.iphone
Subject: Re: Tool to parse Apple Health data
Date: 15 Nov 2022 23:13:43 GMT
Organization: People for the Ethical Treatment of Pirates
Lines: 49
Message-ID: <jtikp7Fbdl9U2@mid.individual.net>
References: <tkvjrg$21bdc$1@dont-email.me>
<jti22eF8gv5U6@mid.individual.net> <tl0pb0$24dpv$1@dont-email.me>
<jtic2rFa5nvU2@mid.individual.net> <tl14s9$25bra$1@dont-email.me>
X-Trace: individual.net Az9tr4X0GpyTlrlmUz1Nmw+q4gz1x9+1o62M7swfPDYvo1aPd9
Cancel-Lock: sha1:edzMEeG/rOm2Z17tz7S8e+KW9Gc=
Mail-Copies-To: nobody
X-Face: _.g>n!a$f3/H3jA]>9pN55*5<`}Tud57>1<n@LQ!aZ7vLO_nWbK~@T'XIS0,oAJcU.qLM
dk/j8Udo?O"o9B9Jyx+ez2:B<nx(k3EdHnTvB]'eoVaR495,Rv~/vPa[e^JI+^h5Zk*i`Q;ezqDW<
ZFs6kmAJWZjOH\8[$$7jm,Ogw3C_%QM'|H6nygNGhhl+@}n30Nz(^vWo@h>Y%b|b-Y~()~\t,LZ3e
up1/bO{=-)
User-Agent: slrn/1.0.3 (Darwin)
 by: Jolly Roger - Tue, 15 Nov 2022 23:13 UTC

On 2022-11-15, Chris <ithinkiam@gmail.com> wrote:
> On 15/11/2022 20:45, Jolly Roger wrote:
>> On 2022-11-15, Chris <ithinkiam@gmail.com> wrote:
>>> Jolly Roger <jollyroger@pobox.com> wrote:
>>>> On 2022-11-15, Chris <ithinkiam@gmail.com> wrote:
>>>>>
>>>>> I've exported my health data from the Health App, but it's in a
>>>>> horribly mangled XML file.
>>>>
>>>> The XML isn't mangled - it's completely valid XML. ; )
>>>>
>>>>> Are their any offline tools for reading the file and export to a
>>>>> more sensible format? I could write my own, but I can't be the
>>>>> only one who wants to do this. Had a google and couldn't find
>>>>> anything obvious.
>>>>
>>>> I did just that (wrote my own) earlier this year to grab my blood
>>>> pressure records from it. I wrote it in Ruby using the nokogiri gem
>>>> to parse the XML, and it was relatively easy to grab the records I
>>>> wanted. The relevant methods are:
>>>>
>>>> (snip)
>>>>
>>>> Pretty simple, really. Just change the XPath to get whatever you
>>>> want, and collect the information in a records array that suits
>>>> your needs.
>>>>
>>>
>>> Thanks. That's really useful. Should be able to get a python script
>>> to do something similar. I just don't have the time at the moment
>>> and need to drop off my bp readings at the GP.
>>>
>>> This should be easier than having to write your own code.
>>
>> I suppose there's a small opportunity for someone to create an app to
>> parse the data and export it as CSV/whatever. I'm just not sure how
>> many people would be willing to purchase it.
>
> It doesn't have to be an app. I'm more than happy with some code on
> github. As I'm sure many others would be.

Have you looked? I just did a search on GitHub for "apple health" and
see a few hits.

--
E-mail sent to this address may be devoured by my ravenous SPAM filter.
I often ignore posts from Google. Use a real news client instead.

JR

Re: Tool to parse Apple Health data

<m14juz951t.fsf@bestley.co.uk>

  copy mid

https://www.novabbs.com/aus+uk/article-flat.php?id=11899&group=uk.comp.sys.mac#11899

  copy link   Newsgroups: uk.comp.sys.mac misc.phone.mobile.iphone
Followup: poster
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: gnu...@bestley.co.uk (Mark Bestley)
Newsgroups: uk.comp.sys.mac,misc.phone.mobile.iphone
Subject: Re: Tool to parse Apple Health data
Followup-To: poster
Date: Tue, 15 Nov 2022 23:22:22 +0000
Organization: A noiseless patient Spider
Lines: 50
Message-ID: <m14juz951t.fsf@bestley.co.uk>
References: <tkvjrg$21bdc$1@dont-email.me> <jti22eF8gv5U6@mid.individual.net>
<tl0pb0$24dpv$1@dont-email.me> <jtic2rFa5nvU2@mid.individual.net>
<tl14s9$25bra$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="4f955e613d08b4d60f450bdee40ca250";
logging-data="2275284"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19DvDKYwXLOIWZT43S7LfUD"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:GeXXzA3/GI9IX+7voPPThe99bkk=
sha1:ZhoHwi1B6riNenkgkq2Df4MC2sI=
 by: Mark Bestley - Tue, 15 Nov 2022 23:22 UTC

Chris <ithinkiam@gmail.com> writes:

> On 15/11/2022 20:45, Jolly Roger wrote:
>> On 2022-11-15, Chris <ithinkiam@gmail.com> wrote:
>>> Jolly Roger <jollyroger@pobox.com> wrote:
>>>> On 2022-11-15, Chris <ithinkiam@gmail.com> wrote:
>>>>>
>>>>> I've exported my health data from the Health App, but it's in a
>>>>> horribly mangled XML file.
>>>>
>>>> The XML isn't mangled - it's completely valid XML. ; )
>>>>
>>>>> Are their any offline tools for reading the file and export to a more
>>>>> sensible format? I could write my own, but I can't be the only one who
>>>>> wants to do this. Had a google and couldn't find anything obvious.
>>>>
>>>> I did just that (wrote my own) earlier this year to grab my blood
>>>> pressure records from it. I wrote it in Ruby using the nokogiri gem to
>>>> parse the XML, and it was relatively easy to grab the records I wanted.
>>>> The relevant methods are:
>>>>
>>>> (snip)
>>>>
>>>> Pretty simple, really. Just change the XPath to get whatever you want,
>>>> and collect the information in a records array that suits your needs.
>>>>
>>>
>>> Thanks. That's really useful. Should be able to get a python script to do
>>> something similar. I just don't have the time at the moment and need to
>>> drop off my bp readings at the GP.
>>>
>>> This should be easier than having to write your own code.
>> I suppose there's a small opportunity for someone to create an app
>> to
>> parse the data and export it as CSV/whatever. I'm just not sure how many
>> people would be willing to purchase it.
>
> It doesn't have to be an app. I'm more than happy with some code on
> github. As I'm sure many others would be.
>
>

I am in the same state wanting to export data - the XMl is actually quite nice but I wanted step data and that is not per day so more complex.

There used to be an app it still has permissions to read my health data but looking through my purchases I can't find it so I guess was 32-bit. It shows up as being called Access

Searching in App Store I do see Health Export CSV for #2.49 plus in app purchases but mutters about a website and also as I can't see what the in-app purchases are for I won't try it. See <https://healthexport.app/>

--
Mark

Re: Tool to parse Apple Health data

<m1zgcr7q8k.fsf@bestley.co.uk>

  copy mid

https://www.novabbs.com/aus+uk/article-flat.php?id=11900&group=uk.comp.sys.mac#11900

  copy link   Newsgroups: uk.comp.sys.mac misc.phone.mobile.iphone
Followup: poster
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: gnu...@bestley.co.uk (Mark Bestley)
Newsgroups: uk.comp.sys.mac,misc.phone.mobile.iphone
Subject: Re: Tool to parse Apple Health data
Followup-To: poster
Date: Tue, 15 Nov 2022 23:27:39 +0000
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <m1zgcr7q8k.fsf@bestley.co.uk>
References: <tkvjrg$21bdc$1@dont-email.me> <jti22eF8gv5U6@mid.individual.net>
<tl0pb0$24dpv$1@dont-email.me> <jtijmvFbdl9U1@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="4f955e613d08b4d60f450bdee40ca250";
logging-data="2275284"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/E0WMQa9yJ91bU64Pemmne"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:DeB5U0xhVbzuffFTBVQoeX3Dzmw=
sha1:QR34JoV3b/Vuozc6Bz8NTmmZ9B0=
 by: Mark Bestley - Tue, 15 Nov 2022 23:27 UTC

Jolly Roger <jollyroger@pobox.com> writes:

> On 2022-11-15, Chris <ithinkiam@gmail.com> wrote:
>>
>> I just don't have the time at the moment and need to drop off my bp
>> readings at the GP.
>>
>> This should be easier than having to write your own code.
>
> You may be able to share your data with your GP this way instead:
>
> <https://support.apple.com/en-us/HT213359>

As stated on that page
If you live in the United States, you can share your health data with participating healthcare providers

So not use here.

Also having found I can not access my medical records on the web but spread over 3 different places only one of which is from the nhs home page but the others do use the NHS authentication to login. And experience from Moorfields where I had a test and they did not know I had tests the previous month for something else as was on a different system. I don;t think the NHS could deal with it even if Apple allowed them.

--
Mark

Re: Tool to parse Apple Health data

<tl21no$2a5g8$1@dont-email.me>

  copy mid

https://www.novabbs.com/aus+uk/article-flat.php?id=11902&group=uk.comp.sys.mac#11902

  copy link   Newsgroups: uk.comp.sys.mac
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: chrisr...@mac.com (Chris Ridd)
Newsgroups: uk.comp.sys.mac
Subject: Re: Tool to parse Apple Health data
Date: Wed, 16 Nov 2022 06:59:00 +0000
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <tl21no$2a5g8$1@dont-email.me>
References: <tkvjrg$21bdc$1@dont-email.me> <jti22eF8gv5U6@mid.individual.net>
<tl0pb0$24dpv$1@dont-email.me> <jtic2rFa5nvU2@mid.individual.net>
<tl14s9$25bra$1@dont-email.me> <m14juz951t.fsf@bestley.co.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 16 Nov 2022 06:59:05 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="37e8a20c10fe55187f6d6dffb1df29c2";
logging-data="2430472"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18hMQxU6d/5htz+VKNJ5MiLMpzaX/O7sOk="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)
Gecko/20100101 Thunderbird/102.4.2
Cancel-Lock: sha1:rO13ubQpi+OP0yGGRa+MHsaYfmY=
In-Reply-To: <m14juz951t.fsf@bestley.co.uk>
 by: Chris Ridd - Wed, 16 Nov 2022 06:59 UTC

On 15/11/2022 23:22, Mark Bestley wrote:
> Searching in App Store I do see Health Export CSV for #2.49 plus in app purchases but mutters about a website and also as I can't see what the in-app purchases are for I won't try it. See <https://healthexport.app/>

The App Store app will tell you near the bottom of the page. For this app:

HealthExport Remote - 1 Month £4.99
HealthExport Remote - 1 year £26.99

"Remote" seems to mean automation support in Shortcuts.

--
Chris

Re: Tool to parse Apple Health data

<tl23bj$2ab4m$1@dont-email.me>

  copy mid

https://www.novabbs.com/aus+uk/article-flat.php?id=11903&group=uk.comp.sys.mac#11903

  copy link   Newsgroups: uk.comp.sys.mac misc.phone.mobile.iphone
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ithink...@gmail.com (Chris)
Newsgroups: uk.comp.sys.mac,misc.phone.mobile.iphone
Subject: Re: Tool to parse Apple Health data
Date: Wed, 16 Nov 2022 07:26:43 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 49
Message-ID: <tl23bj$2ab4m$1@dont-email.me>
References: <tkvjrg$21bdc$1@dont-email.me>
<jti22eF8gv5U6@mid.individual.net>
<tl0pb0$24dpv$1@dont-email.me>
<jtic2rFa5nvU2@mid.individual.net>
<tl14s9$25bra$1@dont-email.me>
<jtikp7Fbdl9U2@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 16 Nov 2022 07:26:43 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="43c4fc522d4a6dea4690fb40eb1c4e67";
logging-data="2436246"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/E8E8Xl7tcSzBCAxPtuoBNaUoHQEZH4j0="
User-Agent: NewsTap/5.5 (iPhone/iPod Touch)
Cancel-Lock: sha1:U2UDyi7U8+dSQ4qjE8IjQFEduh4=
sha1:xGosKuttqj5pZeOSCVszMlrtx0A=
 by: Chris - Wed, 16 Nov 2022 07:26 UTC

Jolly Roger <jollyroger@pobox.com> wrote:
> On 2022-11-15, Chris <ithinkiam@gmail.com> wrote:
>> On 15/11/2022 20:45, Jolly Roger wrote:
>>> On 2022-11-15, Chris <ithinkiam@gmail.com> wrote:
>>>> Jolly Roger <jollyroger@pobox.com> wrote:
>>>>> On 2022-11-15, Chris <ithinkiam@gmail.com> wrote:
>>>>>>
>>>>>> I've exported my health data from the Health App, but it's in a
>>>>>> horribly mangled XML file.
>>>>>
>>>>> The XML isn't mangled - it's completely valid XML. ; )
>>>>>
>>>>>> Are their any offline tools for reading the file and export to a
>>>>>> more sensible format? I could write my own, but I can't be the
>>>>>> only one who wants to do this. Had a google and couldn't find
>>>>>> anything obvious.
>>>>>
>>>>> I did just that (wrote my own) earlier this year to grab my blood
>>>>> pressure records from it. I wrote it in Ruby using the nokogiri gem
>>>>> to parse the XML, and it was relatively easy to grab the records I
>>>>> wanted. The relevant methods are:
>>>>>
>>>>> (snip)
>>>>>
>>>>> Pretty simple, really. Just change the XPath to get whatever you
>>>>> want, and collect the information in a records array that suits
>>>>> your needs.
>>>>>
>>>>
>>>> Thanks. That's really useful. Should be able to get a python script
>>>> to do something similar. I just don't have the time at the moment
>>>> and need to drop off my bp readings at the GP.
>>>>
>>>> This should be easier than having to write your own code.
>>>
>>> I suppose there's a small opportunity for someone to create an app to
>>> parse the data and export it as CSV/whatever. I'm just not sure how
>>> many people would be willing to purchase it.
>>
>> It doesn't have to be an app. I'm more than happy with some code on
>> github. As I'm sure many others would be.
>
> Have you looked? I just did a search on GitHub for "apple health" and
> see a few hits.

I did a google not specifically github.

Anyway, I've written a very basic script to extract the data I need.

Re: Tool to parse Apple Health data

<jtjmo6FgdkgU1@mid.individual.net>

  copy mid

https://www.novabbs.com/aus+uk/article-flat.php?id=11904&group=uk.comp.sys.mac#11904

  copy link   Newsgroups: misc.phone.mobile.iphone uk.comp.sys.mac
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.szaf.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: jeremy0...@gmail.com (jeremy)
Newsgroups: misc.phone.mobile.iphone,uk.comp.sys.mac
Subject: Re: Tool to parse Apple Health data
Date: 16 Nov 2022 08:53:27 GMT
Lines: 19
Message-ID: <jtjmo6FgdkgU1@mid.individual.net>
References: <tkvjrg$21bdc$1@dont-email.me> <jthtguF82gpU1@mid.individual.net> <jti279F8gv5U7@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net GhGCoVftUMTDGmTXkPvh2QWA9lZA69Y0WrcogGGdH/EqpWKT2K
Cancel-Lock: sha1:ktEsrn4iT20TFQUpckObtTbYLZg=
User-Agent: Usenapp for MacOS
X-Usenapp: v1.24/d - Full License
 by: jeremy - Wed, 16 Nov 2022 08:53 UTC

On 15 Nov 2022 at 17:56:57 GMT, "Jolly Roger" <jollyroger@pobox.com> wrote:

>> I came across exactly this - I wanted to track my weight in a
>> spreadsheet - had been adding it into the phone daily. The XML was
>> quite horrible
>
> I'm not sure why you guys think anything is wrong with the XML. It's
> completely valid and easily parsed...

Ok let's be clearer - no suggestion that the XML was not valid but was not in
a format that could be easily (as far as I could see) into a typical end user
app such as Excel - I wanted just two data items (date & weight - note that
the data items don't always have to rhyme) and in the absence of knowledge of
any other tools, took an approach that I knew I could make work (was only to
be a one-off).

--
jeremy

Re: Tool to parse Apple Health data

<jtkb35FjchuU1@mid.individual.net>

  copy mid

https://www.novabbs.com/aus+uk/article-flat.php?id=11909&group=uk.comp.sys.mac#11909

  copy link   Newsgroups: misc.phone.mobile.iphone uk.comp.sys.mac
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news-peer.in.tum.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: jollyro...@pobox.com (Jolly Roger)
Newsgroups: misc.phone.mobile.iphone,uk.comp.sys.mac
Subject: Re: Tool to parse Apple Health data
Date: 16 Nov 2022 14:40:37 GMT
Organization: People for the Ethical Treatment of Pirates
Lines: 25
Message-ID: <jtkb35FjchuU1@mid.individual.net>
References: <tkvjrg$21bdc$1@dont-email.me>
<jthtguF82gpU1@mid.individual.net> <jti279F8gv5U7@mid.individual.net>
<jtjmo6FgdkgU1@mid.individual.net>
X-Trace: individual.net m5EAkSm9vPUrwrkYP6M2oA3og2dLWGaFn+1iTRfqyH4SsBGZds
Cancel-Lock: sha1:a6e431bGiN6DUIfGftqG/2ePjTg=
Mail-Copies-To: nobody
X-Face: _.g>n!a$f3/H3jA]>9pN55*5<`}Tud57>1<n@LQ!aZ7vLO_nWbK~@T'XIS0,oAJcU.qLM
dk/j8Udo?O"o9B9Jyx+ez2:B<nx(k3EdHnTvB]'eoVaR495,Rv~/vPa[e^JI+^h5Zk*i`Q;ezqDW<
ZFs6kmAJWZjOH\8[$$7jm,Ogw3C_%QM'|H6nygNGhhl+@}n30Nz(^vWo@h>Y%b|b-Y~()~\t,LZ3e
up1/bO{=-)
User-Agent: slrn/1.0.3 (Darwin)
 by: Jolly Roger - Wed, 16 Nov 2022 14:40 UTC

On 2022-11-16, jeremy <jeremy0505@gmail.com> wrote:
> On 15 Nov 2022 at 17:56:57 GMT, "Jolly Roger" <jollyroger@pobox.com> wrote:
>
>>> I came across exactly this - I wanted to track my weight in a
>>> spreadsheet - had been adding it into the phone daily. The XML was
>>> quite horrible
>>
>> I'm not sure why you guys think anything is wrong with the XML. It's
>> completely valid and easily parsed...
>
> Ok let's be clearer - no suggestion that the XML was not valid but was
> not in a format that could be easily (as far as I could see) into a
> typical end user app such as Excel - I wanted just two data items
> (date & weight - note that the data items don't always have to rhyme)
> and in the absence of knowledge of any other tools, took an approach
> that I knew I could make work (was only to be a one-off).

I get that, but I wouldn't put much faith in Excel being able to read or
render every flavor of XML out there.

--
E-mail sent to this address may be devoured by my ravenous SPAM filter.
I often ignore posts from Google. Use a real news client instead.

JR

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor