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

Import folder watch process #144

Open
d-rk opened this issue Jan 30, 2022 · 2 comments
Open

Import folder watch process #144

d-rk opened this issue Jan 30, 2022 · 2 comments

Comments

@d-rk
Copy link

d-rk commented Jan 30, 2022

Hey,

I would suggest to have a process in place to watch a configurable import folder for new gpx files.
After doing a workout one currently has to upload the gpx file manually. This is quite inconvenient.
With such a watch process the gpx file could be uploaded to the server somehow (using syncthing for example) and would then be automatically picked up by FitTrackee.

@albertodiazsaez
Copy link

This is a good idea, but how this will support multiple users?

Right now I have the same issue, and I "fixed" it in a "creative" way: I use OpenTracks to record the GPX file, and configure it so it exports the file when the recording is stopped and I have NextCloud to upload (and delete from the phone) the files to a "input" folder in my server, which is monitored by an instance of n8n, which picks up the .gpx files, and using the FitTrackee API, uploads it to FitTrackee, and if everyhing is ok, sends me a notification and moves the gpx file to a "completed" folder, if it fails, it sends me a notification and sends the file to a "failed" folder to see what happened.

It's very "creative" in the way I implemented it because of how I manage my infrastructure (separated NAS via NFS), and I have to make two API requests: for obtaining the token, and to send the file (which I did using SSH instead of the REST node in n8n), but it works, so I hope you can use it as a workaround until a better alternative is added to FitTrackee.

@SamR1
Copy link
Owner

SamR1 commented Jul 14, 2022

Hi,

I'm currently working on implementing OAuth2 Authorization Code flow to allow applications to access API endpoints (#88).

To test the flow, I created a minimal python application to watch a configured directory and automatically import files, with sport according to a matching label (it also converts kml files to gpx format, but it's experimental...).
After authorizing the application, the importer uses the access and refresh tokens stored in a database.

This flow could perhaps simplify access to the API in your infrastructure.

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

No branches or pull requests

3 participants