-
Notifications
You must be signed in to change notification settings - Fork 238
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
Customized export label for file sharing (#333, #470) #483
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same remark here, @Kevin-Salazar-itcr You changed code of ExportToTempFileTask. So your code applies when you upload track to OSM or Share Track.
But we also need the correct name for "Export to GPX", so code in ExportToStorageTask
should be changed as well.
Thank for your correction 😊👍
Hi @jer194 can you write down the export format you want? Currently when we "Export as GPX", we get :
Note we can also have shorter version like
What do you think @jer194 ? 😊 |
Hi @Binnette, 20241210_122458_OSMTracker.gpx, or would be all ok for me, and personally I prefer the shorter formats. Probably specifying the output name via the Unix 'date' format string convention would be the most flexible option for the For the directory format, I usually prefer to not use this option. Thanks a lot to you and all your fellows for all your dedication and work ! |
Ok let's go for shorter format then: The export name also depends on the setting
So there is a "conflict" between this PR and the current behavior. The setting can be And user can customize it. Note It will work only for new tracks as the track name is defined when the track starts. What do you think @Kevin-Salazar-itcr, @jer194, @Andyporras, @miltonials ? |
Hi @Binnette, |
Thank you for your input. I agree that the DATETIME_TRACKNAME.gpx format is a solid option and should be acceptable for current users. Additionally, I would like to note that the track name can be modified after the track has started by accessing the track details. This provides extra flexibility and ensures that exports reflect any changes made by the user. Regarding the Default track name setting, I think it could be implemented as an initial default value while keeping the ability for users to edit it as needed. What do you think? I’m looking forward to hearing from @Kevin-Salazar-itcr and @miltonials as well. Thanks again for your contributions and great work! |
Yes, perfect, that's what I had thought of as well, and also had been proposed by @Binnette in his last post. |
Hi! 👋🏼 @Binnette I agree with the change of filename from With the new functionality to allow the user set a custom label in the filename I think would be great allow the user not set a label too and leave the entry text in blank. A label is not always necessary and may cause long filenames. For example:
Assuming the order @jer194, I read your issue #470. You can add custom tags separated by comma in the "TrackDetails" activity. So, while this is implemented you can set tags or description with your device information and it will be exported inside the .gpx
Or maybe change the default folder name in "Storage folder in documents" to a folder like With the duplicate datetime in filename mentioned by @Binnette and @Andyporras in #482. We can add a check to prevent the filename from being the same as the creation date. Maybe in this case we would add "osmtracker" in the filename to export something like The current exports filenames with the different "Filename for named tracks" options in develop branch are the following: I think the issue #333 is only for "Share GPX", so is just needed to follow the format according to the option selected in "Filename for named tracks". This is consistent with the |
I'm not totally sure if implementing a "Custom labels for filename" functionality would provide us an added value. We have the option to add tags and descriptions inside the GPX file, the option to rename the track and the option of export to a custom folder. I think this already solve #157 and #470.
May be we are overthinking this trying to add a specific functionallity to rename part of a track filename. A better approach would be set default custom comma separed tags for the traces. 🤔 |
Hi @miltonials, I agree with your point. The current options for tags, descriptions, renaming tracks, and custom folders already address the use cases in #157 and #470. Adding default custom comma-separated tags seems like a simpler and more practical solution than a dedicated "Custom labels for filename" feature. Thanks for sharing your thoughts! |
For me it is not what I would like to have:
Anyway, of course I can work around this in other ways, if I'm the only one, and if it is too much effort or too confusing for others. It just would have been convenient |
@jer194, I understand your use case. I think we are trying to 'automate' two similar cases. We can add metadata inside the GPX file and we can rename a track, but in both ways we need to do it manually for each track. That's why I proposed allowing set "comma-separated default custom tags" for traces, since we have no way to allow it without the user manually entering it. These being in the metadata section within the GPX file can also be identified as a tag when uploading in OpenStreetMap or opening the file in geographic information systems. In this case "custom filename labels" seems more important for users. We could add this feature, this PR is a step forward to implement it (ty @Kevin-Salazar-itcr ). And if in the future more users need to set custom default metadata within the GPX file, we already know why they need it and the advantages of implementing it. I would like to mention that as I have understood this functionality we have to make some modifications before the merge:
Of course we can implement the points 4 and 5 first, but it would be great if we fix the parts directly involved in the new functionality. I can collaborate in this. 🙋♂️ I recommend not allow special characters for labels some OS not allow all the availables, add the filename label inside parenthesis to make a distintion between the name and the label. At the end we would have a result similar to the following Please correct me if I am misunderstanding something. I would love to hear your opinions on this matter. 😊 |
Just a clarification about this: |
I appreciate the detailed feedback and clarifications! @jer194's Use Case: I understand that having a global setting for "custom filename labels" would streamline your workflow by eliminating the need for manual edits. This aligns well with the goal of automating the process for bulk exports and ensuring consistency across devices. @miltonials's Suggestions: The proposal to match filenames across all functionalities (Share GPX, Export GPX, and Upload to OSM) and standardize the datetime format (e.g., YYYYMMDD-HHMMSS) makes a lot of sense. Additionally, allowing optional custom labels with clear formatting (e.g., using parentheses) adds flexibility without complicating the experience for users who don’t need it. Next Steps: Combining these ideas, I believe implementing a global "custom filename label" option in the settings is a valuable step forward. This would support both cases: a global label for consistent file naming (as per @jer194’s needs) and the ability to opt out or customize further (following @miltonials’s recommendations). Addressing the identified points (duplicate datetime, associated media naming, etc.) would strengthen this feature further. |
Note: this pr already complies with the sharing part, it would only be necessary to add it to the export as gpx and Upload to OSM. |
I can take care of this myself |
…xport option. fix for bug that cloned names when the name and creation date were the same
The custom label functionality is now implemented in both "Share GPX" and "Export as GPX." Additionally, the bug causing duplicate filenames when the name and date were the same, and the "FILENAME_NAME_DATE" preference was selected, has been resolved. |
The change mentioned to @Kevin-Salazar-itcr by @Binnette has already been implemented. @Binnette, please feel free to review it and share your feedback. |
Thanks a lot! I'll check as soon as I can get hold of the corresponding apk :-) |
@jer194 this is the apk: |
Thanks Andy, it works perfectly for me now!
…On 16 December 2024 13:24:35 CET, Andy Porras ***@***.***> wrote:
@jer194 this is the apk:
[app-debug.zip](https://github.com/user-attachments/files/18149896/app-debug.zip)
--
Reply to this email directly or view it on GitHub:
#483 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
Hi @Andyporras 6 tests are failing. Can you please run the tests in your Android Studio and adapt them to our new code? |
Hi @Binnette, |
@Binnette, I’ve updated the ExportToStorageTaskTest file to reflect the new functionality. The changes resolve the failing tests, and all of them are now passing. Please let me know if additional adjustments are required. |
It allows the user to add a custom suffix label to the name of GPX files when sharing.
Instructions for Use
In
Settings > GPX Settings
, the option "Export label for sharing files" allows the user to customize the suffix of a track for export as a.gpx
file. The exported file will follow the format:YYYY-MM-DD_hh-mm-ss_EXPORT_LABEL
, where_EXPORT_LABEL
defaults to_OSMTracker
.