python-fitparse 2.2.0__tar.gz → 2.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_fitparse-2.2.0 → python_fitparse-2.3.1}/PKG-INFO +1 -1
- {python_fitparse-2.2.0 → python_fitparse-2.3.1}/fitparse/profile.py +53 -3
- {python_fitparse-2.2.0 → python_fitparse-2.3.1}/pyproject.toml +1 -1
- {python_fitparse-2.2.0 → python_fitparse-2.3.1}/scripts/generate_profile.py +9 -1
- {python_fitparse-2.2.0 → python_fitparse-2.3.1}/.gitignore +0 -0
- {python_fitparse-2.2.0 → python_fitparse-2.3.1}/LICENSE +0 -0
- {python_fitparse-2.2.0 → python_fitparse-2.3.1}/README.md +0 -0
- {python_fitparse-2.2.0 → python_fitparse-2.3.1}/fitparse/__init__.py +0 -0
- {python_fitparse-2.2.0 → python_fitparse-2.3.1}/fitparse/base.py +0 -0
- {python_fitparse-2.2.0 → python_fitparse-2.3.1}/fitparse/processors.py +0 -0
- {python_fitparse-2.2.0 → python_fitparse-2.3.1}/fitparse/records.py +0 -0
- {python_fitparse-2.2.0 → python_fitparse-2.3.1}/fitparse/utils.py +0 -0
- {python_fitparse-2.2.0 → python_fitparse-2.3.1}/patches/message_types/location.py +0 -0
- {python_fitparse-2.2.0 → python_fitparse-2.3.1}/patches/message_types/stress_level.py +0 -0
- {python_fitparse-2.2.0 → python_fitparse-2.3.1}/scripts/fitdump +0 -0
- {python_fitparse-2.2.0 → python_fitparse-2.3.1}/scripts/unit_tool.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-fitparse
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.1
|
|
4
4
|
Summary: Python library to parse ANT/Garmin .FIT files
|
|
5
5
|
Project-URL: Homepage, https://github.com/nbr23/python-fitparse
|
|
6
6
|
Project-URL: Repository, https://github.com/nbr23/python-fitparse
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# ***************** BEGIN AUTOMATICALLY GENERATED FIT PROFILE ******************
|
|
2
2
|
# *************************** DO NOT EDIT THIS FILE ****************************
|
|
3
|
-
# *********** EXPORTED PROFILE FROM SDK VERSION 21.
|
|
4
|
-
# ********* PARSED 201 TYPES (
|
|
3
|
+
# *********** EXPORTED PROFILE FROM SDK VERSION 21.212 ON 2026-08-05 ***********
|
|
4
|
+
# ********* PARSED 201 TYPES (4403 VALUES), 124 MESSAGES (1413 FIELDS) *********
|
|
5
|
+
# ***************************** APPLIED 2 PATCHES ******************************
|
|
5
6
|
|
|
6
7
|
from fitparse.records import (
|
|
7
8
|
ComponentField,
|
|
@@ -82,6 +83,7 @@ FIELD_TYPES = {
|
|
|
82
83
|
5: 'swimming',
|
|
83
84
|
6: 'walking',
|
|
84
85
|
8: 'sedentary',
|
|
86
|
+
13: 'wheelchair_pushing',
|
|
85
87
|
254: 'all', # All is for goals only to include all sports.
|
|
86
88
|
},
|
|
87
89
|
),
|
|
@@ -2213,6 +2215,7 @@ FIELD_TYPES = {
|
|
|
2213
2215
|
4586: 'instinct3_amoled_45mm',
|
|
2214
2216
|
4587: 'instinct3_amoled_50mm',
|
|
2215
2217
|
4588: 'descent_g2',
|
|
2218
|
+
4595: 'fenix7_pro_solar_no_wifi',
|
|
2216
2219
|
4603: 'venu_x1',
|
|
2217
2220
|
4606: 'hrm_200',
|
|
2218
2221
|
4625: 'vivoactive6',
|
|
@@ -2236,6 +2239,7 @@ FIELD_TYPES = {
|
|
|
2236
2239
|
4879: 'd2_mach2',
|
|
2237
2240
|
4916: 'fr70_2026',
|
|
2238
2241
|
4944: 'd2_air_x15',
|
|
2242
|
+
5019: 'cirqa_smart_band',
|
|
2239
2243
|
5056: 'd2_mach2_pro',
|
|
2240
2244
|
10007: 'sdm4', # SDM4 footpod
|
|
2241
2245
|
10014: 'edge_remote',
|
|
@@ -3136,6 +3140,7 @@ FIELD_TYPES = {
|
|
|
3136
3140
|
348: 'huawei',
|
|
3137
3141
|
349: 'gotoes',
|
|
3138
3142
|
350: 'cadence_app',
|
|
3143
|
+
351: 'una_watch',
|
|
3139
3144
|
5759: 'actigraphcorp',
|
|
3140
3145
|
},
|
|
3141
3146
|
),
|
|
@@ -4831,7 +4836,7 @@ FIELD_TYPES = {
|
|
|
4831
4836
|
79: 'duathlon', # Multisport
|
|
4832
4837
|
80: 'brick', # Multisport
|
|
4833
4838
|
81: 'swim_run', # Multisport
|
|
4834
|
-
82: 'adventure_race', # Multisport
|
|
4839
|
+
82: 'adventure_race', # Multisport/Running
|
|
4835
4840
|
83: 'trucker_workout', # DEZL trucker workout training sport
|
|
4836
4841
|
84: 'pickleball', # Racket
|
|
4837
4842
|
85: 'padel', # Racket
|
|
@@ -5876,6 +5881,46 @@ MESSAGE_TYPES = {
|
|
|
5876
5881
|
def_num=10,
|
|
5877
5882
|
units='cycles',
|
|
5878
5883
|
subfields=(
|
|
5884
|
+
SubField( # total number of pushes in a session
|
|
5885
|
+
name='total_pushes',
|
|
5886
|
+
def_num=10,
|
|
5887
|
+
type=BASE_TYPES[0x86], # uint32
|
|
5888
|
+
units='pushes',
|
|
5889
|
+
ref_fields=(
|
|
5890
|
+
ReferenceField(
|
|
5891
|
+
name='sport',
|
|
5892
|
+
def_num=5,
|
|
5893
|
+
value='wheelchair_push_run',
|
|
5894
|
+
raw_value=66,
|
|
5895
|
+
),
|
|
5896
|
+
ReferenceField(
|
|
5897
|
+
name='sport',
|
|
5898
|
+
def_num=5,
|
|
5899
|
+
value='wheelchair_push_walk',
|
|
5900
|
+
raw_value=65,
|
|
5901
|
+
),
|
|
5902
|
+
),
|
|
5903
|
+
),
|
|
5904
|
+
SubField(
|
|
5905
|
+
name='total_reps',
|
|
5906
|
+
def_num=10,
|
|
5907
|
+
type=BASE_TYPES[0x86], # uint32
|
|
5908
|
+
units='reps',
|
|
5909
|
+
ref_fields=(
|
|
5910
|
+
ReferenceField(
|
|
5911
|
+
name='sub_sport',
|
|
5912
|
+
def_num=6,
|
|
5913
|
+
value='strength_training',
|
|
5914
|
+
raw_value=20,
|
|
5915
|
+
),
|
|
5916
|
+
ReferenceField(
|
|
5917
|
+
name='sport',
|
|
5918
|
+
def_num=5,
|
|
5919
|
+
value='hiit',
|
|
5920
|
+
raw_value=62,
|
|
5921
|
+
),
|
|
5922
|
+
),
|
|
5923
|
+
),
|
|
5879
5924
|
SubField(
|
|
5880
5925
|
name='total_strides',
|
|
5881
5926
|
def_num=10,
|
|
@@ -11630,6 +11675,11 @@ MESSAGE_TYPES = {
|
|
|
11630
11675
|
def_num=34,
|
|
11631
11676
|
units='minutes',
|
|
11632
11677
|
),
|
|
11678
|
+
41: Field( # Wheelchair Pushes
|
|
11679
|
+
name='pushes',
|
|
11680
|
+
type=BASE_TYPES[0x86], # uint32
|
|
11681
|
+
def_num=41,
|
|
11682
|
+
),
|
|
11633
11683
|
253: FIELD_TYPE_TIMESTAMP, # Must align to logging interval, for example, time must be 00:00:00 for daily log.
|
|
11634
11684
|
},
|
|
11635
11685
|
),
|
|
@@ -644,12 +644,15 @@ def load_field_type_patches():
|
|
|
644
644
|
|
|
645
645
|
def apply_patches(type_list, message_list):
|
|
646
646
|
print("Loading patches...")
|
|
647
|
+
applied = 0
|
|
648
|
+
|
|
647
649
|
field_type_patches = load_field_type_patches()
|
|
648
650
|
if field_type_patches:
|
|
649
651
|
print(f"Applying {len(field_type_patches)} field type patches...")
|
|
650
652
|
for patch_name, patch_type_info in field_type_patches.items():
|
|
651
653
|
if not type_list.get(patch_name, raise_exception=False):
|
|
652
654
|
type_list.types.append(patch_type_info)
|
|
655
|
+
applied += 1
|
|
653
656
|
print(f" Added field type: {patch_name}")
|
|
654
657
|
else:
|
|
655
658
|
print(f" Skipped field type: {patch_name} (already exists in generated profile)")
|
|
@@ -666,6 +669,7 @@ def apply_patches(type_list, message_list):
|
|
|
666
669
|
|
|
667
670
|
if not existing_message:
|
|
668
671
|
message_list.messages.append(patch_message_info)
|
|
672
|
+
applied += 1
|
|
669
673
|
print(f" Added message type: {patch_message_info.name} (num: {patch_num})")
|
|
670
674
|
else:
|
|
671
675
|
existing_nums = {normalize_def_num(f.num) for f in existing_message.fields}
|
|
@@ -674,8 +678,11 @@ def apply_patches(type_list, message_list):
|
|
|
674
678
|
print(f" Skipped field: {existing_message.name}.{patch_field.name} (def_num {patch_field.num} already defined)")
|
|
675
679
|
else:
|
|
676
680
|
existing_message.fields.append(patch_field)
|
|
681
|
+
applied += 1
|
|
677
682
|
print(f" Added field: {existing_message.name}.{patch_field.name} (def_num {patch_field.num})")
|
|
678
683
|
|
|
684
|
+
return applied
|
|
685
|
+
|
|
679
686
|
|
|
680
687
|
def download_latest_sdk(path):
|
|
681
688
|
repo_url = 'https://api.github.com/repos/garmin/fit-sdk-tools/releases/latest'
|
|
@@ -746,7 +753,7 @@ def main(input_xls_or_zip, output_py_path=None):
|
|
|
746
753
|
type_list = parse_types(types_rows)
|
|
747
754
|
message_list = parse_messages(messages_rows, type_list)
|
|
748
755
|
|
|
749
|
-
apply_patches(type_list, message_list)
|
|
756
|
+
patches_applied = apply_patches(type_list, message_list)
|
|
750
757
|
|
|
751
758
|
mesg_num_declarations = []
|
|
752
759
|
for mesg_name in MESSAGE_NUM_DECLARATIONS:
|
|
@@ -779,6 +786,7 @@ def main(input_xls_or_zip, output_py_path=None):
|
|
|
779
786
|
len(type_list.types), sum(len(ti.values) for ti in type_list.types),
|
|
780
787
|
len(message_list.messages), sum(len(mi.fields) for mi in message_list.messages),
|
|
781
788
|
)),
|
|
789
|
+
header('APPLIED %d PATCH%s' % (patches_applied, '' if patches_applied == 1 else 'ES')),
|
|
782
790
|
'', IMPORT_HEADER
|
|
783
791
|
]) + '\n'
|
|
784
792
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|