feat: non-destructive sync, vocabulary import, simple template syntax, and improved error handling - #541
Open
nithou wants to merge 4 commits into
Open
feat: non-destructive sync, vocabulary import, simple template syntax, and improved error handling#541nithou wants to merge 4 commits into
nithou wants to merge 4 commits into
Conversation
…, and better error handling
- Non-destructive sync: preserve user content under "## Personal Notes"
section across re-imports instead of overwriting entire files
- Vocabulary import: extract looked-up words from Kobo's "My Words"
(WordList table) into a single vocabulary file
- Simple template syntax: support {{Title}}, {{Author}}, {{highlights}}
shorthand alongside full Eta.js syntax
- Error handling: show specific actionable error messages with import
statistics instead of generic "Check console" notices
- Remember SQLite path: auto-load KoboReader.sqlite from stored path
on subsequent imports (merged from PR OGKevin#521 by eton-s)
- Handle missing bookTitle: use content title as fallback instead of
crashing on custom books/articles (merged from PR OGKevin#483 by dulangaj)
- Fix broken suggestion click/mouseover handlers, ReadStatus.Unopened
rendering, async/sync mismatch, and other bug fixes
- Update README with new features, simple template syntax reference,
and settings documentation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The content merger now extracts the Personal Notes section by finding the next ## heading boundary rather than consuming to EOF. This allows the section to live anywhere in the template — typically right after the title heading, before Description and Highlights. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ility
The shorthand preprocessor now matches `{{ Title }}` and `{ { Title } }`
in addition to `{{Title}}`. This prevents Obsidian linters or YAML
formatters from breaking template variables by inserting spaces inside
braces.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Notes section is preserved across re-imports. Users can position it anywhere in their template.
vocabulary file. Dynamically detects available columns (DictSuffix, VolumeId, DateCreated) via PRAGMA
table_info, following the existing hasBookmarkColorColumn() pattern. Controlled by two new settings:
"Import vocabulary" and "Vocabulary file name".
variables as an alternative to Eta <%= it.bookDetails.title %> syntax. Both syntaxes can be mixed
freely. Tolerant of linter-inserted spaces ({{ Title }}, { { Title } }).
specific, actionable messages. An ImportContext class tracks books imported, highlights extracted,
vocabulary words, and warnings, presenting a summary like "Imported 12 books (347 highlights). 2
warnings: ...".
sessions using Electron's webUtils.getPathForFile. Auto-loads on next modal open.
throwing when bookTitle is null, making the plugin resilient to custom books/articles with incomplete
metadata.
Additional fixes