feature: add advanced settings w/ book ID frontmatter population #62
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUGGESTION
Let's get #67 reviewed/merged first - it's more important - then i'll rebase this PR.
Context
This adds a good chunk of the functionality i suggested in this discord thread - primarily the ability to save the readwise book ID to frontmatter.
This is basically step 1 in improving the reliability of the plugin's sync functionality.
Issues with the current sync:
booksIDsMap
indata.json
#68)Other notes:
settings.bookIDsMap
Readwise: add book ID to document's frontmatter
action for the command palette. I could make it appear only when the key is set in advanced settings.Changes in this PR
Advanced settings
modal, accessed via a button in the main settings menusettings.frontmatterBookIdKey
data.json
Advanced settings
modal:Populate
[settings.frontmatterBookIdKey]: bookId
.settings.frontmatterBookIdKey
settings.frontmatterBookIdKey
is not setIMPORTANT NOTE ❗ 👉 an even better solution than having the plugin set this field's value this would be to add a
book_id
variable toYAML Frontmatter
template section on the Obsidian Export settings page. Then the plugin would just read from this field (not write). I'm just working with what i can do in plugin land.Screenshots