Added sleep.csv. Added merged.csv. Renamed steps.sh

This commit is contained in:
2024-07-21 17:15:20 +01:00
parent 1818b69a09
commit f8d3efab55
3 changed files with 49 additions and 2 deletions

13
steps-day.sh Executable file
View File

@@ -0,0 +1,13 @@
#! /bin/bash
# Script to extract Huawei watch steps from Apple Health full export
# into a csv file
cat export.xml |
grep 2024- |
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 >steps.csv