pgaskin/kepubify

Question about potential integration with calibre

Closed this issue · 14 comments

While kepubify has been a dream regarding performance and accuracy, I miss the ability to send books to my device via the library management interface from calibre. I was wondering if perhaps there was any interest in developing a wrapper plugin around a kepubify install to send kepubs to the device via kepubify.

OK. I'll consider this. Would you be thinking about a toolbar button, or a conversion plugin?

I suppose a conversion plugin? I'm not too familiar with how those work. Rather than clicking a toolbar button to manually convert to a kepub, I was thinking that the plugin would do that automatically behind the scenes whenever you transfer an ePub to a kobo device.

May be worth looking at the Kepub Output plugin by Joel Goguen:
Forum Discussion and Repository

Better to use collaboration than be doing overlapping work!

@Wdavery kepubify was created as an alternative to the plugin (see the webpage for why). Calibre integration is because some people want to use kepubify with Calibre, but it is not the main goal of kepubify.

Apologies, it's been a while since I read the webpage, although it reads more as an alternative to calibre itself than the output plugin that is only mentioned in regards to speed.

I'd definitely love to see kupubify as a plugin. I can help test when it gets to that point. Thank you for your work!

@Wdavery It's OK. As for testing, it's not quite ready for that yet, but when it is, I'll post here.

c02y commented

It is very nice that kepubify can work with Calibre, currently Calibre(plugin) will automatically convert epub to kepub.epub before sending epub to Kobo device, but since kepubify is much better, why not replace the automatically convert epub to kepub.epub part with kepubify.

Since I manage all my files between Calibre and kobo device, and all files epubfils are all in Calibre library instead of one directory, if I use standalone kepubify to convert epub to kepub.epub, how should I send them to kobo device? Put the all kepub.epub files into Calibre again and send them to Kobo, that will occupy a lof of extra disk space.

As a workaround, could kepubify have an option to include an external opf file in the kepub.epub build?

This would make it possible to use the calibre opf file for conversion (as opposed to having to update all the epub files directly).

(This would be very useful for easily updating series information for seriesmeta use.)

That should be possible. I could do that two different ways. One is I could allow it when only converting a single book by including both in the conversion. The other is I could have an option to include an OPF file if there is only one book and an OPF in the directory. Do you know if the OPF would include all information or if I'd need to merge it?

Great! (And thanks for making these really useful tools available.)

Looking at calibre behaviour (not code), I think it pulls in opf information if present in the book on import and stores this in its master database. A backup opf file is also placed in the same directory as the book. The backup opf files can be used to rebuild the master database if it gets corrupted.

All updates to metadata from the GUI is written to the calibre master database and continues to be written into the backup opf file (i.e. I don't see any opf updates within an epub archive unless you use advanced settings).

From this, it seems most likely that the evolution of the opf metadata is divergent from the original information and would not have to be merged by kepubify.

I suspect that it would be very useful if kepubify could read the calibre backup opf files with both methods you propose (only one book or recursively by directory assuming single book and opf in each).

The plug board features in calibre are very useful but require using the calibre kepub workflow. These proposed additions would make it very easy to use the advantages of calibre (nondestructive metadata updates and organization) and kepubify.

Thanks!

Correction: it does look as if at least series information is written back into the original epub file---so the external opf feature may not be needed.

What happens when importing a non-epub book with an OPF, then adding an epub with a different file layout as an additional format?

I checked Calibre>Preferences>Plugins>Get_New_Plugins and kepubify is still not available as a plugin. Any updates on this?

I'm also interested in seriesmeta and covergen as Calibe plugins.

The more I consider this, the less convinced I am that this would be a good idea on the whole. Making this into a Calibre plugin just adds more work and potential bugs, while removing most of the advantages of using kepubify (remember that it was originally designed for people not using Calibre).

For bulk conversion of books into Calibre for improving the performance of initial imports, there are quite a few ways to use kepubify for this (look on MobileRead) without needing it to be a plugin. I may write a tool to automate this if there is enough demand (i.e. more than one or two requests per month).

I'm going to close this for now unless there is a convincing reason to make a plugin.