hadynz / obsidian-kindle-plugin

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

[BUG] Notes missing from "My Clippings" import #237

Closed le-doux closed 1 year ago

le-doux commented 1 year ago

Describe the bug

When I import highlights manually from the "My Clippings" file, not all of my notes are imported successfully. After looking through the original txt file, it seems like notes with a location that does exactly match the start location of a highlight are left out (but I could be wrong).

P.S. Thanks for this plugin!

Method of syncing

To Reproduce

Steps to reproduce the behaviour:

  1. Click the "Sync your Kindle Highlights" button
  2. Click sync
  3. Click "upload my clippings file"
  4. Select the "My Clippings" file from the file browser

Expected behaviour

I expect all notes to be imported.

Metadata

ProudBenzene commented 1 year ago

Hello, I have met the same problem with you and I saw your issue just now. I'd like to share my case.

I found that in some of my books, the notes will be linked to the wrong highlight in the wrong order. Some books simply just don't import my notes, only the highlights.

To ensure the kindle plugin to be blame, I uploaded my clipping.txt to the website my.clippings.io, and it succeeded in exporting all my highlights and notes.

image image image

This is really an excellent plugin, but this problem greatly reduces the experience of using it🥲 please the author to fix it as soon as possible! Thank you for your contribution to the convenience of Kindle users!

ProudBenzene commented 1 year ago

Hello, I have met the same problem with you and I saw your issue just now. I'd like to share my case.

I found that in some of my books, the notes will be linked to the wrong highlight in the wrong order. Some books simply just don't import my notes, only the highlights.

To ensure the kindle plugin to be blame, I uploaded my clipping.txt to the website my.clippings.io, and it succeeded in exporting all my highlights and notes.

image image image

This is really an excellent plugin, but this problem greatly reduces the experience of using it🥲 please the author to fix it as soon as possible! Thank you for your contribution to the convenience of Kindle users!

If necessary, I can offer my "My Clippings.txt" to help you find where the problem lies.

hadynz commented 1 year ago

Sorry for being MIA @ProudBenzene. I haven't had a chance to work on the plugin for sometime.

I've just read this issue now 😳. If you can share your a subset of clippings file showing the problem it would help me a lot to make a fix for this. Thanks.

ProudBenzene commented 1 year ago

Sorry for being MIA @ProudBenzene. I haven't had a chance to work on the plugin for sometime.

I've just read this issue now 😳. If you can share your a subset of clippings file showing the problem it would help me a lot to make a fix for this. Thanks.

Thank you for your reply! I'll send my clippings.txt to the email address you left on the GitHub page later!

hadynz commented 1 year ago

@ProudBenzene thank you so much for sharing with me your clippings.txt file on email.

I've managed to fix the first issue were your notes were not being parsed. The plugin had basic Chinese support, and there was a couple of bugs parsing Chinese book titles and general highlights as I never had examples to use for testing.

This should now be fixed in 1.9.1. Can I ask you to download and confirm it solved the absence of your notes?

In terms of the issue with order... I think I know what the issue is, but it is very had for me to resolve without seeing the original text. From what I can see, there are many highlights on the same page, and their is an issue with positioning.

Can you also confirm if the order issue still exists. And if possible, can you send me a screenshot of the Kindle pages that has several of your highlights that are not ordered correctly by the plugni.

ProudBenzene commented 1 year ago

@ProudBenzene thank you so much for sharing with me your clippings.txt file on email. @ProudBenzene 非常感谢您在电子邮件中与我分享您的clippings.txt文件。

I've managed to fix the first issue were your notes were not being parsed. The plugin had basic Chinese support, and there was a couple of bugs parsing Chinese book titles and general highlights as I never had examples to use for testing.我已经设法解决了第一个问题是你的笔记没有被解析。这个插件有基本的中文支持,并且在解析中文书籍标题和一般亮点时有几个bug,因为我从来没有用于测试的例子。

This should now be fixed in 1.9.1. Can I ask you to download and confirm it solved the absence of your notes?现在应该在1.9.1中修复此问题。我可以请你下载并确认它解决了你的笔记缺席?

In terms of the issue with order... I think I know what the issue is, but it is very had for me to resolve without seeing the original text. From what I can see, there are many highlights on the same page, and their is an issue with positioning.关于秩序的问题…我想我知道问题是什么,但它是非常有我解决没有看到原文。从我所看到的,有很多亮点在同一页上,他们的是一个定位的问题。

Can you also confirm if the order issue still exists. And if possible, can you send me a screenshot of the Kindle pages that has several of your highlights that are not ordered correctly by the plugni.您是否也可以确认订单问题是否仍然存在。如果可能的话,你能给我一个Kindle页面的截图,其中有几个你的亮点没有被plugni正确排序。

Hello, thank you for your update! I have been looking forward to the repair of this bug!

Just re-imported my book, as you said, the order problem of highlights has been solved, the first issue has been solved, and my notes in 《飘》(gone with the Wind) have been transferred perfectly with highlights. For the second issue, I just tested it, and the re-imported 《围城》(besieged Fortress) did not reappear the problem that the previous notes did not correspond to the order of highlights. In other words, I feel that this problem have also been fixed. Of course, I'd be happy to provide you with screenshots of misordered notes in Kindle and other help to check this problem before using this version of the plug-in. If still needed, please let me know and I will send it to you by e-mail.

I have a new bug that seems to have appeared. after syncing books, some books generate two markdown files, one of which has a number in the file name. my file naming template is {{title}}-{{authorsLastNames}}, which doesn't contain a number. the content of the two files is exactly the same, only the file names are different. not all books generate two files, only some do. if it's not related to this issue, I can raise another issue about it😁.

image

Then, by the way, it seems that you forgot to change the version number in manifest.json in your release, which may cause others not to check for updates🤔.

Finally, thank you for your work on this plug-in, and thank you for your efforts to fix this bug!

hadynz commented 1 year ago

Thanks for confirming that all the issues you initially experienced have now been resolved @ProudBenzene. I will close this thread on that basis.

With regards to what you've experienced were the plugin creates two markdown files. This is by design. The plugin does not override any existing files (as there is no guarantee that a user has not made their own custom changes that they want to retain). So it opts to create new syncs under a new name by appending a timestamp to the end of the file. I've created #243 to allow a user to customise this behaviour.

And thanks for reminding me about mainfest.json! I haven't updated the plugin in sometime and have already forgotten my workflow.