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

Upload field note file via OKAPI #601

Open
Lineflyer opened this issue Jan 3, 2021 · 7 comments
Open

Upload field note file via OKAPI #601

Lineflyer opened this issue Jan 3, 2021 · 7 comments

Comments

@Lineflyer
Copy link

For c:geo we recently had a discussion about field note upload for other sites than geocaching.com.
From OC.de I know that field notes (also including duplicate handling with GC geocodes) is already implemented on their website.

For c:geo it would just be perfect if there is a possibility to upload field notes via OKAPI.
I looked over here and other places but could not find a related issue for OKAPI. I hope this is the right place to discuss/address it.

@teiling88
Copy link
Contributor

Hey @Lineflyer,

can you provide me an file for this use case? I can try to implement it :-)

Greetings,
Thomas

@wrygiel
Copy link
Member

wrygiel commented Jan 4, 2021

BTW, could you remind me what's the difference between field notes and personal notes? (I'm not an active geocacher nowadays.)

@teiling88
Copy link
Contributor

Field Notes are notes about caches created with your GPS Device or an app like c:geo. So you can prepare your Log Notes and submit them finally later.

@Lineflyer
Copy link
Author

20210105182416.txt

Attached a sample field note from c:geo containing offline logs for both gc.com and oc.de caches.

@hxdimpf
Copy link

hxdimpf commented Nov 23, 2023

I plan to implement that service method shortly ... in a way that is compaitble with what "the other platform" does. Specificly it will be tolerant to filter OC logs and discard "the other logs", just like the other platform does with OC logs.

Also, if you (@Lineflyer) are reading this: There is another important function missing, which cgeo wants to use: save_user_coords it resembles to a large degree what the other platform calls corrected coordinates. A PR for that function is in the pipe, as you probably noticed already. It is now a matter of review, merge, and then integration into opencaching.de production.

hxdimpf added a commit to hxdimpf/okapi that referenced this issue Nov 25, 2023
hxdimpf added a commit to hxdimpf/okapi that referenced this issue Nov 25, 2023
hxdimpf added a commit to hxdimpf/okapi that referenced this issue Nov 25, 2023
hxdimpf added a commit to hxdimpf/okapi that referenced this issue Nov 25, 2023
hxdimpf added a commit to hxdimpf/okapi that referenced this issue Nov 25, 2023
hxdimpf added a commit to hxdimpf/okapi that referenced this issue Nov 25, 2023
hxdimpf added a commit to hxdimpf/okapi that referenced this issue Nov 25, 2023
@hxdimpf
Copy link

hxdimpf commented Nov 25, 2023

@Lineflyer, pls review PR #630 to see whether this would work for cgeo. The assumption is that cgep maintains one hybrid filednotes file, which may include log records for more than one platform. My PR will ignore records not starting with OC. Please note that the log types must case sensitively match the log types as defined for the OCDE platform. Also note that the fieldnotes file needs to have utf-8 chacacter encoding and the whole string needs to be passed as base64 encoded. Conseqently, when uploading to more than one platform during the "Export fieldnotes" dialog in cgeo, cgeo must pre-process the data before pushing.

For instance, what is a Write note on one platform must show up as Comment on OCDE. There are a few more discrepancies, even though those will be very rarely encountered.

Also, keep in mind, no UTF-16, and keep in mind the base64 encoding. And last not least: OKAPI equally supports GET and POST requests, however, since fieldnotes files can get rather large, a GET may fail due to length restrictions of URLs. My recommendation for using the service in question would be to use POST requests and put the payload into the request body.

I can make sample client code available for the cgeo team.

hxdimpf added a commit to hxdimpf/okapi that referenced this issue Nov 26, 2023
hxdimpf added a commit to hxdimpf/okapi that referenced this issue Nov 26, 2023
hxdimpf added a commit to hxdimpf/okapi that referenced this issue Nov 26, 2023
hxdimpf added a commit to hxdimpf/okapi that referenced this issue Nov 26, 2023
hxdimpf added a commit to hxdimpf/okapi that referenced this issue Nov 26, 2023
hxdimpf added a commit to hxdimpf/okapi that referenced this issue Nov 26, 2023
hxdimpf added a commit to hxdimpf/okapi that referenced this issue Nov 26, 2023
hxdimpf added a commit to hxdimpf/okapi that referenced this issue Nov 26, 2023
hxdimpf added a commit to hxdimpf/okapi that referenced this issue Nov 26, 2023
@bekuno
Copy link
Contributor

bekuno commented Nov 27, 2023

@hxdimpf Thanks for diving in this problem. The discussion to UTF-8 vs. UTF16-LE with BOM is in issue cgeo/cgeo#10044. I believe that using UTF-8 for OKAPI fieldnotes would be fine. Please open a issue on c:geo site to discuss the implementation there.

hxdimpf added a commit to hxdimpf/okapi that referenced this issue Dec 1, 2023
hxdimpf added a commit to hxdimpf/okapi that referenced this issue Dec 1, 2023
hxdimpf added a commit to hxdimpf/okapi that referenced this issue Dec 1, 2023
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

5 participants