Closed mbafford closed 3 years ago
I've tested an verified that you can use exactly the same code to download drawings, at least static representations of them - e.g., change the for loop to:
for image in note.images + note.drawings:
This will download a PNG version of the image (named jpg by this code, but most programs don't really care).
My guess is there's a vector or more complicated format available as well, since you can click on the drawing in Keep and continue editing it. I only have one drawing in my keep library that I created for testing.
Merged in #5. Also commented on the pull request but I'll put it here too. Your work has been merged, I finished your todo,
I'm still undecided about whether (and where) to save the OCR text, suggestions are welcome.
See this commit for a first rough pass at this: https://github.com/mbafford/keep-exporter/commit/43447684fd7265866bfe5bd6cd5e386594cccd3d
The images API is undocumented, but I was able to piece together how to get the image URL from looking at the image URL in Google Keep and the
gkeepapi
code. This commit works for all of my notes as far as I can tell, but I'm sure it fails on some other edge case.The URL generated by the API is simply:
when Google Keep references the image, it also adds these parameters:
There's interesting metadata available in:
note.images[0].blob
, e.g.:No original image filename that I can find.
TODO