djsudduth / keep-it-markdown

Convert Google Keep notes dynamically to markdown for Obsidian, Logseq, Joplin and Notion using the unofficial Keep API. Also, import simple markdown notes back into Google Keep.
Apache License 2.0
494 stars 32 forks source link

Import notes with creation time and last modified time #59

Closed wedgiebee closed 1 year ago

wedgiebee commented 1 year ago

Hello, I used keep-it-markdown to import some notes into Google Keep, super cool functionality! Is there a way for the markdown file's created time/last modified time to be used for the imported Google Keep note's created time/last modified time?

djsudduth commented 1 year ago

Hmmmm.....didn't consider that option. I'll check!!

djsudduth commented 1 year ago

@wedgiebee - unfortunately the Keep create and update date-time for notes are read only and not set-able. However, those dates could be added as text fields in the import. Would that work for you at all?

wedgiebee commented 1 year ago

Ahhh that's a bummer. Hope they make it write-able eventually!

With the text fields idea, would that just be appended as text to the end of the note? Like "Created: xx-xx-xxxx"? That would be an awesome workaround for sure if I'm understanding correctly.

djsudduth commented 1 year ago

@wedgiebee yes, appending the dates at the end of the note. I'll add that feature.

djsudduth commented 1 year ago

@wedgiebee - so I've added the append of the dates to the note - but I see an issue. If you copy any markdown notes to another directory and then import from that directory, the create date will reflect the current date of the copy - but, the update date will be the original edited date. So, in that case the create date is newer than the update date.

How about just adding the update date only?

wedgiebee commented 1 year ago

Ahhh that is a bit of an issue. At least for me, "create date" is more important to me than "update date," for the sake of posterity and knowing when a note was created, so I'd rather have that if possible! For the file duplicating issue, I think that could just be accepted as a part of how duplication ("new" file, so new creation date). Personally I'd be happy with that.

Maybe the more satisfying solution is to detect if the note contains an appended "create date" already, and if it does then don't append a new one? So if you were going to duplicate a note that you wanted to preserve the original "create date", you'd manually add that to the end of your note before duplicating. (But again, I think just accepting an updated creation date as part of how duplicating works is fine as well.)

djsudduth commented 1 year ago

@wedgiebee I've added this in the develop branch. To preserve the create date on a Windows markdown file you have to use Robocopy instead of copy - that solves the date issue. I also fixed a bug that would crash KIM on import if there are special characters in the md file.

If you want to use this change just download kim.py file in that 'develop` branch. Let me know if that works for you.

djsudduth commented 1 year ago

Added in 0.5.2