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

[Feature request] Automatic cleaning of CSV files. 'Allow auto sending' option #1083

Closed
LOVE2CMOL opened this issue Jun 18, 2023 · 9 comments
Milestone

Comments

@LOVE2CMOL
Copy link

LOVE2CMOL commented Jun 18, 2023

If I use CSV queue sending( 'Allow auto sending' option), it will result in the creation of CSV files. If the CSV file has already been recorded with a custom URL, there is no need to save the file on the device. Cleaning can be done automatically without manual intervention.Due to limited storage space on my location device...

Thank you 😊

@LOVE2CMOL
Copy link
Author

Alternatively, the CSV file will not be generated if the option to generate CSV files is not selected when using the automatic sending feature to a custom URL.

@LOVE2CMOL
Copy link
Author

Perhaps the CSV file generated by selecting the 'Allow auto sending' option can be used as a temp file.

@LOVE2CMOL LOVE2CMOL changed the title [Feature request] Automatic cleaning of CSV files. [Feature request] Automatic cleaning of CSV files. 'Allow auto sending' option Jun 18, 2023
@mendhak
Copy link
Owner

mendhak commented Mar 2, 2024

I don't really have a way to do this cleanly, because the 'auto sending' of URLs is not synchronous with the rest of the application; that means points can be logged to the CSV while at the same time lines from minutes ago are being sent to Custom URL.

A better way to see it is that the Custom URL "auto send" feature is piggybacking off the CSV file logging feature.

I am wondering if it's better to raise a broadcast when a file upload is done, and it could try sending the file name, and a third party application like Llama/Tasker could then delete the file instead.

@mendhak
Copy link
Owner

mendhak commented Mar 2, 2024

I am wondering if it's better to raise a broadcast when a file upload is done, and it could try sending the file name, and a third party application like Llama/Tasker could then delete the file instead.

Ah not straightforward like I thought, many of the uploaders don't know about the file they're dealing with or when they're done, and they're background jobs, so I don't have a reliable way of saying that an upload is complete. (Should have listened to my own comment)

@JoannaBurlandBDR
Copy link

Could you have it so the URL job removes the line from the csv file?

Or maybe an option to auto delete after a day/week etc.

I'm currently using this for expense tracking and it's filling up my phones storage and creating a lot of duplicates if I don't manually action it everyday. I am considering using Llama or otherwise but would prefer an all in one.

Thanks for the great app otherwise super happy, I'd contribute if I weren't such an amateur!

@mendhak
Copy link
Owner

mendhak commented Apr 1, 2024

I think it's best to stick to Llama/Tasker for clearing up files. I have had a few requests, but I really don't want to make GPSLogger a file manager, including having it remove entries from files. There's just too much interdependent logic which can go wrong, and it's too destructive to troubleshoot. A lot of the reasoning boils down to GPSLogger being very 'stateless', it writes to a file and actually forgets about it. It has no knowledge of files it's written to in the past.

@mendhak
Copy link
Owner

mendhak commented Apr 1, 2024

Alright, tried once more and I think I have a way to do this.

I can get the app to send a broadcast when a file is uploaded. Tasker or Automate can listen for the broadcast and then choose to delete the file.

This allows the app to continue to be stateless, and it's up to the user to take responsibility for deleting the file.

Example of what the broadcast will look like: https://github.com/mendhak/gpslogger/pull/1126/files#diff-ee93d376b875c680c27e935b59452e931ae71952faf41cc268973e002498b224R78

Just did a quick test in Automate.

image

image

@mendhak
Copy link
Owner

mendhak commented Jul 10, 2024

v131 is in the releases and FDroid

@mendhak mendhak closed this as completed Jul 10, 2024
@LOVE2CMOL
Copy link
Author

NICE! thanks!

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