Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work with Kobo Clara HD #4

Closed
bootlegcoal opened this issue May 4, 2022 · 15 comments
Closed

Does not work with Kobo Clara HD #4

bootlegcoal opened this issue May 4, 2022 · 15 comments

Comments

@bootlegcoal
Copy link

Found /Volumes/KOBOeReader/.kobo/BookReader.sqlite
"Extract" button turns green in importer.
On pressing extract, a message pops up: "Something went wrong... Cannot read properties of undefined (reading 'values').

@MichaelLepori
Copy link

The same Problem for me:
image
on Kobo Libra 2

@OGKevin
Copy link

OGKevin commented Aug 13, 2022

Hey, I'm looking into taking over this plugin, as I love my Kobo.

Do you mind opening the console and see what error you get there, so I can try and fix it in https://github.com/OGKevin/obsidian-kobo-highlights-import.

@DonnieWest
Copy link

@OGKevin new Kobo owner (Kobo Libra 2) with the same issue. Getting this error:

TypeError: Cannot read properties of undefined (reading 'values')
    at ExtractHighlightsModal.fetchHighlights (plugin:obsidian-kobo…rter-plugin:2599:59)
    at HTMLButtonElement.eval (plugin:obsidian-kobo…rter-plugin:2644:60)
    at HTMLButtonElement.r (plugin:obsidian-kindle-plugin:333:36023)

If you need some more details or debugging info, lemme know. I'm happy to look at this more in depth

@OGKevin
Copy link

OGKevin commented Aug 29, 2022

@DonnieWest
Copy link

@OGKevin updated to the most recent version ( 1.1.1 ) and still failing to import highlights. Here's the new error

TypeError: Cannot read properties of undefined (reading 'values')
    at ExtractHighlightsModal.eval (plugin:obsidian-kobo…ter-plugin:18732:59)
    at Generator.next (<anonymous>)
    at fulfilled (plugin:obsidian-kobo…porter-plugin:36:24)

@OGKevin
Copy link

OGKevin commented Sep 5, 2022

Oh boy. I had a look at the code, and it seems that the data retrieval from the database yields no results.
The only way from e to properly figure out why it's failing is by getting my hands on a database from Kobo Libra 2.
As I suspect that the database has a different layout 😩.

Do you mind sharing your DB with me? If so, you can do this via discord. If you join the obsidian discord, you would be able to send me a DM. Same username as my GitHub.

I'll update the code to return a human-readable error when there is no data 👍🏾

OGKevin added a commit to OGKevin/obsidian-kobo-highlights-import that referenced this issue Sep 5, 2022
@OGKevin
Copy link

OGKevin commented Sep 6, 2022

I did some investigation yesterday. And, I can say with confidence that this is related with #5 #2.

The current query is not correct, I've managed to come up with one that is accurate. Some logic is needed however to properly parse the data, and it's a multi query job rather than a single query.

Once I've had time to implement my discovery, this and the mentioned issues should be resolved 🎊

@OGKevin
Copy link

OGKevin commented Sep 8, 2022

I've managed to solve the issue in OGKevin#5.

On my own database, I've managed to extract highlights that I was not aware that were missing from the export.
I also managed to extract highlights from the database that @DonnieWest provided.

The database layouts seems to be the same, it was just the query that was using an incorrect assumption.

I'll clean up the code, add some tests and find a way to programmatically check that indeed all highlights have been exported.
Let me know if you want to be able to test this yourself, I'll be happy to create a pre-release.

@MichaelLepori
Copy link

@OGKevin That looks as you find the problem! I am looking forward to use it. If you pre-release it, I will test it.

@OGKevin
Copy link

OGKevin commented Sep 10, 2022

@MichaelLepori Nice to hear!

You can download the main.js file from https://github.com/OGKevin/obsidian-kobo-highlights-import/releases/tag/1.2.0-beta.1 and replace .obsidian/plugins/obsidian-kobo-highlights-importer-plugin/main.js in your vault.

Remember to have obsidian closed when you replace the file. Or restart obsidian if you had it open :)

@MichaelLepori
Copy link

@og Kevin. I tried it and it's working greatly. Thank you fixing it. I tried also to import the highlights again. And it overwrites the existing files.
I tried also to write a note attached to the highlight. It is not so important, but I try to ask you: Is there a way to export also these notes?
In the example 3 new Notes (Books) in the Folder KoboReader and 3 Highlights in the third book
image

@OGKevin
Copy link

OGKevin commented Sep 10, 2022

@MichaelLepori Good to hear that it works.

I'll add notes support later.

And it overwrites the existing files.
This is indeed the expected behavior. Are you saying that this is not the behavior that you expect?

@OGKevin
Copy link

OGKevin commented Sep 10, 2022

The feature to export notes can be tracked via OGKevin#6

OGKevin added a commit to OGKevin/obsidian-kobo-highlights-import that referenced this issue Sep 11, 2022
@OGKevin
Copy link

OGKevin commented Sep 11, 2022

1.2.0 has been released with this fix!

@bitwiseops do you mind closing this issue 🙏🏾

@bitwiseops
Copy link
Owner

Sure @OGKevin !

Closing issue because a fixed release has been released here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants