Closed yuvgin closed 9 months ago
I believe there are two issues here:
For the behaviour you desire, you might have to call sync()
after every new note.
Thanks for the quick reply. I tried syncing after every createNote, and also tried adding time.sleep after every sync. Didn't do the trick..
Oh, I understand now. The sorting of notes is defined via the sort
attribute on notes, which is randomly generated. You can set it to a monotonically increasing/decreasing value:
for i, blah in enumerate(items):
note = keep.createNote()
note.sort = i
...
That works, thanks!! Perhaps add it to the docs, it seems important :)
I'm using gkeepapi to transfer notes into keep from another note app.
I have a dataframe of ~1000 notes that I iterate over. The dataframe is sorted by creation date (of the original notes) but when I sync they appear in keep in the wrong order (despite the fact that the node's timestamps are in the correct order). Any idea what's going on?
Running on Ubuntu with python 3.7