Open SenorSmartyPants opened 3 months ago
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.
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.
Sounds good to me :-)
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
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?