Add export-to-steps-csv.sh
This commit is contained in:
12
export-to-steps-csv.sh
Normal file
12
export-to-steps-csv.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Script to extract Huawei watch steps from Apple Health full export
|
||||
# into a csv file
|
||||
|
||||
cat export.xml |
|
||||
grep 'type="HKQuantityTypeIdentifierStepCount" sourceName="HUAWEI Health"' |
|
||||
cut -d\" -f 14,16 |
|
||||
tr \" \ |
|
||||
cut -d\ -f 1,4 |
|
||||
awk '{ steps[$1]=steps[$1]+$2 } END { for (date in steps) { print date "," steps[date] } }' |
|
||||
sort
|
||||
Reference in New Issue
Block a user