Kobo (ereader) Highlights importer

An happy user is a great reward, thank you.

BTW I already found a bug. If the title of the book contains “forbidden” chars (eg. \ / : ) then Obsidian thrown an error if you click on it to create a note.

If you have any issues or suggestions you are more than welcome to report them Issues · Edo78/obsidian-koreader-sync · GitHub

I released a new version with a breaking change.
All the old notes have to be removed or they will be duplicated. I’m really sorry about this but now the name of the note can be freely changed.

Hi there, I’m using KoReader on an Android phone, is this plugin compatible? Clicking the button doesn’t do anything - is this because my phone isn’t mounted as a drive?

It should works … I’m not sure about the right path to have in the settings …
If your are you on linux/mac you can try:
find [path] -iname metadata.\*.lua (replace [path] with the path you use in the settings)
This way you can check if it’s right and if the system can find those files.

Ok this is marvelous work @Edo78! I had to adjust the path on a Mac to /Volumes/KOBOeReader and after that it worked like a charm. I love the fact that so many metadata is also captured. And I must say, I’m also very happy that I switched to KOReader again. Making notes and highlights is a much smoother proces than on the native reader :smile: .

For my workflow however, a singular big file for each book would be ideal. Maybe it’s a bit excessive, but I probably highlight something every 2 pages. I use those to make literature notes after I’ve finished the whole book, only after which I distill singular atomic notes from that big literature note.

I don’t like to make notes while reading, so I usually err on the side of too many highlights so I can still grasp the essence of the text just by rereading my highlights. So with the current setup that would mean around 150 separate notes for a 300 page book.

I would love to see an option that would result in something similar like the attached picture. I really like the fact that the chapter is captured. This would help me so much in quickly seeing the general outline of the book and my notes.

I really don’t know if this would be possible and I’m already extremely grateful for the current plugin, so sorry if I’m over-asking!

1 Like

I’m glad that you like my work. Don’t be afraid to ask new features, in the worst case I’m not gonna do it :wink:

This request is already an open issue All annotations in the same note · Issue #9 · Edo78/obsidian-koreader-sync · GitHub and if you want to be update (and if you have or want a github account) you can subscribe to that issue.

BTW I recently released version 0.2.0 with support for custom template so this should be fairly easy to do.

In the meantime, if you are familiar with Dataview, I have detailed few example that can help you creating a view similiar to your screenshot. Sadly it will be readonly but with a link to the original note you can quickly jump to a note to edit/remove it.

Ahh yes, I just noticed that I’m late to the party.

I was already trying to figure out a way using dataview, I’m getting close with this approach:

table without id koreader-sync.data.chapter AS Chapter, koreader-sync.data.highlight AS Hightlight, koreader-sync.data.text AS Note
where koreader-sync.data.title = "Flow"

But not yet ideal. I’m subscribing to the issue and will check out the custom template function. But you really are on fire with these quick updates! :fire:

I don’t want to spam but if you are interested be notified about new releases of my plugin…
On github the button “Watch” → “Custom” → “Releases” :wink:

Thanks, done. I just added two feature requests as well to the GitHub!

@Edo78 Going to check your updates today, love the speed you put out!

In the meantime, since it looked like you were taken a bit by surprise that anybody would want a single note for a book. Im very curious as to how you process a book into your zettelkasten/PKM system.

I’m still struggling with the concept of literature notes from books, mainly because I have so many notes/highlights. Sometimes my literature note ends up like an extended excerpt in my own words of the whole book, which I then process into small atomic notes. But this is quite a laborious process with a lot of friction.

So I’m very interested to see how others tackle this. Could you share your general take on how you process books in obsidian?

As the update are small and easy to implement I have no problem in doing a bunch of small releases.
Right now I’m still studying “How to take smart notes” so I’m really not 100% sure about how to manage them.
I’m just trying to create “atomic” notes. If an idea in a book trigger something inside me I’ll take a note but I have no other reference to the book. Then, usually a few days later, I’ll look at the note and see how to give it a better value or if it’s useless and I remove it (right now it’s a problem with the plugin because deleted note in obsidian are imported again). Then link will emerge, something in the note can ring a bell and I remember or search something to link the note to or let a broken link to something that still isn’t in obsidian.
Then exploring the graph I can see the hub of concepts that are spontaneusly emerging and than I can use those connections.

I’ve just released version 0.6.0 and (to me) it’s a big update. Now the plugin is automagically detect whenever the text (and only the text itself, no title, chapter, page, highlight, etc) is changed and will update the frontmatter without any user intervention.

This is really useful if you have a dataview query to list all the notes that you still have to edit or you can create a more complex book template extracting only the text it will be always updated.

Let me know if you have any feedbacks

Readwise just announced cloud syncing of Kobo highlights How do I import highlights from Kobo? - Readwise

Does this offer anything useful?

Not sure if Kobo has an API with account access.

Hi everyone. I really like the plugin but I have an issue.

My koreader is in a Kobo Libra H2O that I connect only via WiFi and this does not mount a drive on my laptop.

Any ideas on what could be a workaround to keep my highlights from the device synchronised to Obsidian?

Hi, i faced an error with the plugin Koreader, i am using windows 11.
The problem is that the plugin won’t work, because there is a problem in the code workflow.
If you want a manual fix, check the js file of the plugin and see my solution
It appear that KOReader send two calls to the function createNote, one with the note info, and the other with the highlight associated. Then i verified (by testing) that the code breaks with the first one (the note info), and only works on the second (the highlights). So the solution is avoid those typeError that appear on the first call.
i have done an easy but manual fix for that, by editing the plugin code (it is on ones vault, hidden), as in the image (see the line number)


and the code is here:

  createNote(note) {
    return __async(this, null, function* () {
      const { path: path2, uniqueId, bookmark, managedBookTitle, book, keepInSync } = note;

      // console.log(bookmark.text.match(/\d+/g)[0])

      // Solution: Condition by null or undefined cases when Text is from Note and not Highlight adding text or note, and isPlaceholder
      const textOrNote = bookmark.text.match(/\d+/g)
      const page = textOrNote ? parseInt(textOrNote[0]) : -1;

      // herre also
      const isPlaceholder = bookmark.text.split(bookmark.datetime)[1]
      const noteItself = isPlaceholder ? isPlaceholder.replace(/^\s+|\s+$/g, "") : "";

i know javascript but never used github, so please someone check this out or illl need to learn to commit.
Nevertheless, once the problem is fixed, PROFIT!!!

I can no longer edit my comment, the solution has a problem. when definning page variable, instead of -1 at the end, replace with this. This solve the page number problem
bookmark.page.match(/\d+/g)[0]

I get here only now having the same need of Heiders, so I am very interested in how this project is going on… is it still going on???
Thank you!

The project looks promising, but at least for my use case, it has a lot of bugs yet, and it is almost a year since the last update.

So, i played with the code, since there is already the base of the functionality to import notes, and rewrote the code, separating into subfolders and adding the next functionality:

  • Create a new review note where only the frontmatter is updated.
  • Extract the book cover (it uses python) as an image
  • Solve the notes naming for windows (not for mac or linux since i don’t use those)
  • Solve the import of book highlights and notes (since in specific cases, there are notes that wasn’t imported or empty highlight’s note)

Now i am figuring out how to convert it to a plugin, the hardest part is the python code and test the plugin in more case scenario to find and solve bugs.

If you are interested on those new functionality, and know how to work with plugins, you can do the final part and upload it, or pick the code and build your own.
My repository

1 Like