hadynz / obsidian-kindle-plugin

Sync your Kindle notes and highlights directly into your Obsidian vault
MIT License
886 stars 51 forks source link

Reset sync & template does nothing #66

Closed Amparose closed 2 years ago

Amparose commented 3 years ago

Every time I sync my clippings file it adds the principle count to the stats on the modal screen. This is dumb and needs fixing. Also, altering the template doesn't seem to do anything. Are we supposed to edit a file or just the narrow text input on the plugin settings panel?

This is a great plugin but really needs a proper QA and fix from the dev.

hadynz commented 3 years ago

Thanks for creating an issue. I am unclear on the exact nature of the problems that you are describing. If you can clarify what you intended, it will help fix the problem at hand.

Every time I sync my clippings file it adds the principle count to the stats on the modal screen.

What do you mean by "principle count"?

Also, altering the template doesn't seem to do anything

That should not be the case. The plugin will use the latest version of the template when it writes any new book synchronisations. If you don't have any new books, you could delete previous book highlights and re-sync again to see the latest changes of your template being used.

Amparose commented 3 years ago

Sorry, I wasn't sure what to call the "initial book count". So I have 8 books with notes in my clippings.txt, when I resynced the file it would keep adding another 8 books to the "Your Kindle Highlights" modal. I just checked and it was at "56 books" with only 8 note files. Now I am experiencing the opposite: after pressing the grey Reset button in settings and deleting the generated notes, the book count in the modal stays at "0" no matter how many times I delete the notes and sync.

If you don't have any new books, you could delete previous book highlights and re-sync again to see the latest changes of your template being used.

This seemed to work with test text I added to template. The plugin doesn't seem to be scraping any metadata for the books and every note has a big gap at the top. Conversely, I have added space in the template so that highlight notes should be on their own line but they still scrunch up against the location without even a space between them.

hadynz commented 2 years ago

You are raising multiple things in your question/issue. So let me try and unpack what I understood you are raising. Let me know if you think I missed something.

Issue 1: Book count incorrectly keeps incrementing This is potentially a bug. You only have 8 books in your library. Every time you attempt to sync, even though nothing new is synced, the book count is always incremented by the plugin, showing you 56 which is incorrect.

Issue 2: Book count stops incrementing after reset I believe this not a bug. Even though your book count has been set to 0, I am assuming that your 8 books from your library exist in the Obsidian vault. Every time you attempt to resend, the plugin is automatically skipping your 8 books and never incrementing your book count which keeps remaining as 0.

Issue 3: Book metadata not being scraped The plugin tries to fetch metadata for a given Amazon purchased book from Amazon. Metadata will not be available for books not purchased via Amazon (as it is difficult to accurately identify the book). Not all metadata is always available for books purchased from Amazon. Amazon doesn’t always consistently provide consistent metadata for all its books.

They plugin README file provides a clear explanation of what template variables that you can expect to always be there, never to be there, and sometimes to be there.

Issue 4: Space in the template note is not being respected The plugin’s default template trims any white space before a note by using a Nunjuck’s white space control tag. Replace {%- with {%} and it should resolve this issue for you.

Let me know if my understanding (and assumptions) are correct. That will help in identifying what problems and enhancements need to be worked on.