Plugins for Calibre Integration. Finally annotations sync for epub, etc

I regret to say that I had no success. Please see the attached screenshot.

you are in a demo graph, the plugin works in a local network

OK. I opened a new graph, and now I am getting the /calibre: add a calibre book. But the book is not found although it is present in calibre and the server is running, as the screenshots below verify. Please advise.

you need to configure the logseq-calibre-metadata:

1, copy the name of your calibre folder
2, set the server, in your case, set it to be: http://localhost:8080

then try again

below is my screenshot for your reference …

Yes, these values were set when I installed the plugin. The directory was originally ~/Calibre Library, but I also tried Calibre Library with the same result: Cannot connect to server.

Apparently the space in the directory name was a problem. Even with quotes it did not work. So I moved the Calibre library to Calibre_Library folder and now Logseq does not complain about not being able to connect. However, it also does not find any books. Please advise.

sorry, i didn’t noticed you replied in the thread…

there was an update of these 2 plugins just yesterday, maybe you noticed, the configuration is the same as before, but now you need to set it up in the “logseq-calibre-annotation” plugin.

so far, i have no idea where is wrong, but suggest you to check:

  • calibre server started at http://localhost:8080
  • port 8080 is not occupied by other applications
  • move the folder of calibre next to logseq

below is my setup after i updated the 2 plugins

I tried to reproduce the issue you reported. This may not be your case, but in case it helps:

The plug-in would connect to the server but would not find any books when I renamed the Calibre library folder in the file explorer, instead of moving it with the switch/create library>Move the current library to a new location feature of Calibre.
This seemed to created some sort of collision, since Calibre remembered the old library and also recognized the new one. It was not transparent in the desktop application, but the content server kept presenting both libraries, just one would be empty. I’m not sure if it did not take into account the library name given in the options of the plug-in or why it happened, but in that case, the plug-in would also not return any books.
Getting Calibre to forget about the first library did not prove easy. After a couple of tests, I uninstalled Calibre and installed it again, this time directly linking it to the Calibre_Library folder. After starting the content server, all was good and the plug-in could connect and find the books.

Thank you so very much for the work you have put into this plug-in. At first, I was not planning on using it because I:

  • am jaded towards the content server that Calibre includes
  • did not want to add another critical dependency to my Logseq workflow

…, yet now I am hooked! Wonderful job and big hurrah for your continued involvement!

1 Like

When I changed from “Calibre Library” to “Calibre_Library”, that was done by creating a new, empty folder named “Calibre_Library” with the file explorer, and then using the Move the current library to a new location feature of Calibre. I did not rename any directories in the file explorer, so seems to be different than what you are describing. Can you reproduce the problem with my scenario?

Hi. I apologize for my lack of engagement in this thread. I am not usually active here. I hope the following would resolve your problem.

Calibre automatically replace space with _ in library names containing spaces within its database, so when there are both “Calibre Library” and “Calibre_Library”, its solution for duplication is to add number id. So now your “Calibre_Library” could probably be accessed with name “Calibre_Library1” from the web API of the plugin.

If you want to confirm, browse the content server and click on the library. The URL will be something like this “http://[::1]:8081/#library_id=Lib_with_space1&panel=book_list”. You may also use a completely different name like My_Library or Calibre_Lib.

1 Like

I believe the answer above would address your confusion. Because the new library is actually Calibre_Library1 in the database and Calibre_Library is empty the plugin wouldn’t be able to detect books. Reinstall Calibre makes it reinitialize the database so problem was solved.

By the way, in the new version, spaces are auto-replaced with underscores by the plugin so library names with space are viable now. Though I’d recommend still avoid them.

1 Like

This is the URL for my library:

http://[::1]:8080/#library_id=Calibre_Library&panel=book_list

Again, my first library had a space in the name, “Calibre Library”, and my second replaced the space with an underscore. It looks like it is pointing to the second one to me. And that would correspond to

“http://[::1]:8081/#library_id=Lib_with_NO_space1&panel=book_list”

Not sure what this means.

May I confirm these?

What libraries are shown when you visit http://[::1]:8080/ ?
Does http://[::1]:8080/#library_id=Calibre_Library&panel=book_list show any books in the browser?
Could you visit http://[::1]:8080/#library_id=Calibre_Library1&panel=book_list in the browser?

To elaborate, if I go to http://[::1]:8080/ , there are two libraries like this:
image

I created “Lib with space” first then “Lib_with_space”. Currently clicking on “Lib with space” will go to http://[::1]:8080/#library_id=Lib_with_space&panel=book_list while “Lib_with_space” will go to http://[::1]:8080/#library_id=Lib_with_space1&panel=book_list . Notice that “Lib with space” ID actually has underscores and the real “Lib_with_space” has the additional “1” to distinguish it from the first.

Here are the results you requested. Note the URLs in the address bars:


It seems like my previous diagnosis was off the mark.
But I believe the newest update would solve your problem. Please update the plugin and see if it persists. With settings Content Server Link: http://[::1]:8080 , Calibre Library: Calibre_Library

The plugins were updated and this is the result:

Could you confirm (not) getting the JSON API when going to http://localhost:8080/ajax/books/Calibre_Library ?

Typically response status code 401 happens when authentication is necessary but that doesn’t seem essential for you to access in the browser. Just in case you could check if the option Require username and password to access Content Server is enabled in Calibre > Preferences > Sharing over the Net .

Here you go:


So it seems like login is actually required.

Have you filled in these fields in the plugin setting?

Maybe uncheck the Require username and password... box and restart the server to see if the plugin will work.

1 Like