Closed tjhowse closed 6 months ago
I wanted to either add an API endpoint, or a directory per user to auto-import from.
What are the thoughts? Should the files be deleted on successful import in case of the directory?
Here's how I'd do it:
This system gives us reasonable confidence we're not going to start importing a file while it's still being written to disk, and avoids deleting anything. Does that sound reasonable?
I'll make a PoC with this flow:
I sync GPX files from fitotrack to my server. I would love to drop them into a directory and have them automatically import into workout-tracker.
It might be less work overall to write a crontask to curl the GPX files to the workouts endpoint, provided I can get the auth sorted out.
In any case: Love this project! I just imported 401 workouts into my instance in one go. It took a few minutes but worked perfectly. Thanks hugely!