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:
often "loses track" of files that have gotten synced
filenames can change via settings on the exports config page, or when the user manually changes the name
Other notes:
These changes do not use that ID for anything, it's purely for personal data management.
In a future PR, I intend to integrate the now-available frontmatter book ID from this PR into the rest of the plugin's functionality so it will be preferred over the frequently buggy/out-of-sync settings.bookIDsMap
I also intend to explore adding a 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
adds an Advanced settings modal, accessed via a button in the main settings menu
adds 1 new setting: settings.frontmatterBookIdKey
this simply stores the frontmatter book ID the user sets in the data.json
this setting does NOT have a default value.
adds 1 new button in the Advanced settings modal: Populate
when used, this action populates the readwise-exported notes' frontmatter with the [settings.frontmatterBookIdKey]: bookId.
this action will not overwrite any existing values for the given settings.frontmatterBookIdKey
this button is disabled when the settings.frontmatterBookIdKey is not set
a notice will show when population is starting and has finished
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:
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 setScreenshots