What I would like to do is use curl inside gthumb to load observations from the photos, taking the GPS of the photo as geometry, and then speed up the loading of my observations.
Hello and thanks!
I don’t know. It is in the farmier cloud.
For the first with -H …TOKEN
the result with /log (https://bonushenricus.farmos.net/log) is
“The page request “/log” doesn’t found”
In the case of the try with -H … .json and without TOKEN
the result is “403 Access Denied: CSRF validation failed”
That is assuming that your farmOS-cookie.txt file is in the same directory (from earlier), and that echo $TOKEN prints a valid token. If not, then perform the authentication steps again before running the command above (just replace [USER] and [PASS]):
Hmm, and are you seeing any output in the terminal after the POST? Normally it will return JSON with the ID of the new log that was created, when successful.
Don’t worry! Running curl commands can be very finicky. You have to get it perfect in order for it to work.
Some thoughts:
That chunk of code you pasted should actually be three separate commands (maybe they got munged together and you tried to run them together?)
I also notice that your single and double quotes are formatted (as opening and closing quotes), rather than the plain quote characters from the keyboard. That may have been a result of copying and pasting from this forum. Just make sure that they are plain (not “left” or “right” quotes) in the commands you run.
You were also missing a $ in front of {TOKEN}.
I fixed all of those in the commands below. Try running these one after another:
I try with farmOS-cookie.txt modified removing the # and changing the timestamp expire. I command new TOKEN. The TOKEN in Farmier | farmOS Hosting, Support, and Development change.
The result of curl -X POST is:
403 Forbidden
P.S.: yes double quotes are formatted wrong from a result of copying and pasting to this forum.
Definitely need to be careful posting those details anywhere public @bonushenricus - as they would allow anyone access to your farmOS. The easiest way to invalidate them is to go to your farmOS and log out then log back in. That should reset any sessions for your user account.
When I go to the countryside for my field technician job I often make visual observations with photos with my Olympus TG-3 with GPS: excellent photos.
When I get home I download them with GThumb, I select them, I make them smaller.
Often on the field I don’t have time to write many notes, also I don’t have a smartphone, the tablet is old and uncomfortable to carry around.
Here I was born the idea of creating observations on FarmOS from the photos.
This is my solution:
I create a little script to create a .json file from a photo with command
For the file image it’s difficult to realise base64 I believe.
But I can upload the photo later manually. The important thing is to upload an observation that has the exact point of the photo and the exact date and time of the shot, and the description I gave to the photo.
when it comes to photos of insects I load the photos into the INATURALIST: in this way I have help in identifying.
The next step could be to use the INaturalist API to create an observation in FarmOS with the position, description and in the notes the link to the observation on INaturalist.