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
479 stars 31 forks source link

Feature Request: Allow custom template for note export #79

Open quinn-p-mchugh opened 8 months ago

quinn-p-mchugh commented 8 months ago

This is a big ask, but submitting just in case this would be valuable to other users.

The Issue

Currently, there is no way to customize the way markdown notes are generated for each note in Google Keep.

Proposed Solution

Using a templating engine like Jinja, users could be able to specify their own Jinja template to use for generating markdown notes.

For example:

Below is the default export format:

- I'd like to find system for (X)
- Is a hot dog a sandwich?
- Add questions to document

Created: 2024-01-15 05:40:34   ---   Updated: 2024-01-15 05:40:34

[https://keep.google.com/#NOTE/1705297229969.1234682776](https://keep.google.com/#NOTE/1705297229969.1234682776)

Using a custom template, the user could have their markdown notes formatted in the following way if they prefer having the note metadata stored in markdown frontmatter:

---
created: 2024-01-15T05:40:34
updated:  2024-01-15T05:40:34
note-url: [https://keep.google.com/#NOTE/1705297229969.1234682776](https://keep.google.com/#NOTE/1705297229969.1234682776)
---
- I'd like to find system for (X)
- Is a hot dog a sandwich?
- Add questions to document

The template file for the above would look something like:

---
created: {{ created_at }}
updated: {{ updated_at }}
note-url: [{{ note_url }}]({{ note_url }})
---
{{ note_content }}
djsudduth commented 8 months ago

Interesting idea! Now that Obsidian supports front-matter that makes some sense! I'll take a look at it,