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

Kepub: Updates metadata and renames, or more? #77

Closed
SenorSmartyPants opened this issue Apr 4, 2024 · 6 comments
Closed

Kepub: Updates metadata and renames, or more? #77

SenorSmartyPants opened this issue Apr 4, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@SenorSmartyPants
Copy link

We just added a Kobo to our devices and downloaded a couple books from COPS using the kepub features. Kobo downloads the kepub.epub files and then show up fine. But I was wondering if COPS also adds the spans around sentences, and any other features that seem to make kepubs different from epubs. I looked at the code and didn't see anything like that. Trying to make an annotation was a little buggy so far (on one try).

If cops doesn't do any span updates, what are the thoughts on integrating something like kepubify to do that?

@mikespub
Copy link
Member

mikespub commented Apr 4, 2024

As you say, COPS doesn't change anything besides the cover and file extension, so anything else would be Kobo-specific weirdness :-)

I'm not too happy with the idea of including a platform-specific executable with COPS itself, but we could add an option to convert files to kepub via a configurable external tool like kepubify - PRs are welcome (hint) :-)
You could then update linuxserver docker-cops to include kepubify in their docker image like Dockerfile to package it for those who want to.

To be honest, I'd prefer that any conversion be handled on the Calibre side, like with https://github.com/joseluiscd/calibre-kepubify or some other Kobo plugin.

@SenorSmartyPants
Copy link
Author

SenorSmartyPants commented Apr 5, 2024

I replaced the COPS renamed kepubs with kepubified files and the issues we were experiencing on the Kobo have gone away (Couldn't make annotations, or bookmark pages). So it definitely makes a functional difference on the device.

Adding the optional conversion of kepubs would be good. I'd rather have epubs converted on the fly to kepubs. I lean towards only storing an open standard version of the books, and just one copy, that's just me. But if you're open to including the option, I might look at implementing that if/when I have the time.

@mikespub
Copy link
Member

mikespub commented Apr 5, 2024

Sounds good to me :-)

@mikespub mikespub added the enhancement New feature or request label May 3, 2024
@SenorSmartyPants
Copy link
Author

I made a LSIO custom-init scripts to install kepubify (copied the code from calibre-web dockerfile)

But I'm not sure about how you'd like this hooked up as an external command option.

ARM64 version

  echo "***install kepubify" && \
  if [ -z ${KEPUBIFY_RELEASE+x} ]; then \
    KEPUBIFY_RELEASE=$(curl -sX GET "https://api.github.com/repos/pgaskin/kepubify/releases/latest" \
      | awk '/tag_name/{print $4;exit}' FS='[""]'); \
  fi && \
  curl -o \
    /usr/bin/kepubify -L \
    https://github.com/pgaskin/kepubify/releases/download/${KEPUBIFY_RELEASE}/kepubify-linux-arm64

  chmod 755 /usr/bin/kepubify

x86-64 version

  echo "***install kepubify" && \
  if [ -z ${KEPUBIFY_RELEASE+x} ]; then \
    KEPUBIFY_RELEASE=$(curl -sX GET "https://api.github.com/repos/pgaskin/kepubify/releases/latest" \
      | awk '/tag_name/{print $4;exit}' FS='[""]'); \
  fi && \
  curl -o \
    /usr/bin/kepubify -L \
    https://github.com/pgaskin/kepubify/releases/download/${KEPUBIFY_RELEASE}/kepubify-linux-64bit

  chmod 755 /usr/bin/kepubify

@mikespub
Copy link
Member

mikespub commented Sep 1, 2024

Included in release 2.8.0 - please test & report issues as needed, since I don't have a Kobo device myself...

@mikespub mikespub closed this as completed Sep 1, 2024
@SenorSmartyPants
Copy link
Author

I tested with wget and also with the Kobo device. Everything seems to work great. Kobo downloads the kepub version and imports it correctly as a kepub.

Thanks!

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

No branches or pull requests

2 participants