When executing the script on already downloaded activities, the file will not be re-downloaded again, but the activity data will be appended to the csv file, creating doubles and worst.
I find solution to be pretty simple but I don't know how to propose it via GitHub. This has always been a big mystery to me. Do you know to point me to some instructions for dummies?
I'm just adding a return TRUE or FALSE to the function export_data_file. FALSE is returned when the file already exists; TRUE is returned at any other case.
In the main program, I also invert the functions to write the file and write the csv data with an if clause, like this:
# Save the file and inform if it already existed. If the file already existed, do not append the record to the csv
if export_data_file(str(actvty['activityId']), activity_details, args, start_time_seconds, append_desc, actvty['startTimeLocal']):
# Write stats to CSV.
csv_write_record(csv_filter, extract, actvty, details, activity_type_name, event_type_name)
Thank you for all your work on this splendid script.
Hello all.
When executing the script on already downloaded activities, the file will not be re-downloaded again, but the activity data will be appended to the csv file, creating doubles and worst.
I find solution to be pretty simple but I don't know how to propose it via GitHub. This has always been a big mystery to me. Do you know to point me to some instructions for dummies?
I'm just adding a return TRUE or FALSE to the function export_data_file. FALSE is returned when the file already exists; TRUE is returned at any other case.
In the main program, I also invert the functions to write the file and write the csv data with an if clause, like this:
Thank you for all your work on this splendid script.
Best regards.