gkeepapi icon indicating copy to clipboard operation
gkeepapi copied to clipboard

Convert a `gkeepapi.node.Note` to `gkeepapi.node.List`

Open bergercookie opened this issue 3 years ago • 1 comments

Hi there,

Is there a way, via gkeepapi to convert a Note to a List? As far as I understand, the only difference between the two is whether the checkboxes are toggled or not. Is there a way programmatically to do so or does the user need to always do this via hand in the Google Keep gui?

P.S. Thanks for this tool. I'm using it in taskwarrior-syncall to write a two-way synchronization tool against Taskwarrior

bergercookie avatar Apr 16 '22 20:04 bergercookie

Not at the moment. I took a quick look and it appears that the code to do this is client side.

To convert to a list:

  • Split content by newlines, create a new ListItem for each entry
  • Delete the original entry

To convert to a note:

  • Join the content of all lists with newlines
  • Delete the original listitems

If you decide to implement this, PRs are welcome :]

kiwiz avatar Apr 17 '22 19:04 kiwiz