Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new option to stop further downloads after duplicate occurs #76

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

bxsx
Copy link
Contributor

@bxsx bxsx commented Jun 2, 2022

Summary

This PR adds a new option --exitondup (shortcut: -x) which stops further downloads of activities when a duplicate occurs.

Motivation

This feature saves bandwidth and processing time in case the user only wants to download the latest activities to the directory where the older activities are located.

Old behavior / without --exitondup

Welcome to Garmin Connect Exporter!
[WARNING] Output directory /garmin/ already exists. Will skip already-downloaded files and append to the CSV file.
Connecting to Garmin Connect... Done.
Requesting Login ticket... Done. Ticket=
Authenticating... Done.
Getting display name... Done. displayName=
Fetching user stats... Done.
Querying list of activities 1..100... Done.
Downloading: Garmin Connect activity (1/100) [...] ...
	...
        Original data file already exists; skipping...
Downloading: Garmin Connect activity (2/100) [...] ...
        ...
	Original data file already exists; skipping...
Downloading: Garmin Connect activity (3/100) [...] ...
        ...
	Original data file already exists; skipping...
Downloading: Garmin Connect activity (4/100) [...] ...
        ...

With --exitondup

Welcome to Garmin Connect Exporter!
[WARNING] Output directory /garmin/ already exists. Will skip already-downloaded files and append to the CSV file.
Connecting to Garmin Connect... Done.
Requesting Login ticket... Done. Ticket=
Authenticating... Done.
Getting display name... Done. displayName=
Fetching user stats... Done.
Querying list of activities 1..100... Done.
Downloading: Garmin Connect activity (1/100) [...] ...
	...
        Original data file already exists; skipping...
--exitondup flag enabled. Skipping the remaining activities.
Done!

Notes

This feature does not check if older activities are missing. Once a single file already exists it finishes the job. That's it.

--exitondup enables faster processing in cases such as syncing all
activities in one directory.
@telemaxx
Copy link
Contributor

telemaxx commented Jun 4, 2022

good idea! I will try to integrate this in my fork...

@bxsx
Copy link
Contributor Author

bxsx commented Mar 16, 2024

@pe-st any plans to merge it? I can update the branch and resolve conflicts..

@pe-st
Copy link
Owner

pe-st commented Mar 24, 2024

Hello @bxsx , sorry, I ignored this PR. I'll integrate it if you can update it, thanks already!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants