babluboy / bookworm

A simple ebook reader for Elementary OS
GNU General Public License v3.0
1.32k stars 101 forks source link

mobi support uses python2 #307

Closed bhepple closed 4 years ago

bhepple commented 4 years ago

I'm trying to package bookworm for fedora but we are not allowed to include python2 code. The scripts in data/scripts/mobi_lib are python2 so I have to exclude them.

This does not appear to affect the functionality of reading .mobi files (although I have no DRM-encumbered .mobi files to test) so I want to ask you:

babluboy commented 4 years ago

@bhepple Sounds strange that without Python2 how the mobi unpack is working. Note that once the mobi file is unpacked, bookworm does not need python to render the book in the library and for reading the same. Its just used for extracting the html content out of the .mobi file.

Per Issue #241 I can look to port the mobi unpack library to Python3 keeping python2 for backward compatibility, however the longer term goal is to remove the python dependency and rewrite the unpacking logic in vala

bhepple commented 4 years ago

Hmmm - you're quite right. I just tried it again and got an error message ''Problem in extracting contents of book...."

I don't know what I could have done wrong this morning when I first tried it - maybe not enough coffee.

So it seems that at least there is no crash, we just can't read .mobi format.

The choice then is either:

or

I'm going to let you decide - it's your software, after all!

Please let me know what you decide

Thanks and stay healthy!!

Bob

On Thu, 9 Apr 2020 at 18:25, Siddhartha Das notifications@github.com wrote:

@bhepple https://github.com/bhepple Sounds strange that without Python2 how the mobi unpack is working. Note that once the mobi file is unpacked, bookworm does not need python to render the book in the library and for reading the same. Its just used for extracting the html content out of the .mobi file.

Per Issue #241 https://github.com/babluboy/bookworm/issues/241 I can look to port the mobi unpack library to Python3 keeping python2 for backward compatibility, however the longer term goal is to remove the python dependency and rewrite the unpacking logic in vala

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/babluboy/bookworm/issues/307#issuecomment-611400826, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQ6U2U7J2GUTECEYNEYEV3RLWA6ZANCNFSM4MEJWWPA .

babluboy commented 4 years ago

What timelines are you looking at for Fedora Packaging ? I guess it will take me till this weekend to test and upgrade to Python3

bhepple commented 4 years ago

Hi Siddhartha

I'm new at this but I would imagine that it will take another 1-2 weeks to get the existing package (less the python2 elements) through testing.

If I go to a new release I'd need to start with a formal review so that could add another week or so.

fedora is slow, careful and conservative

Cheers

Bob

On Fri, 10 Apr 2020 at 02:19, Siddhartha Das notifications@github.com wrote:

What timelines are you looking at for Fedora Packaging ? I guess it will take me till this weekend to test and upgrade to Python3

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

babluboy commented 4 years ago

@bhepple I have updated the mobi unpack library to the new version which works with Python2.7/Python3. If you can compile and test the latest code, the mobi files should now open with Bookworm.

Hopefully this resolves the issue and you can continue to package Bookworm for Fedora. Let me know in case of further issues and also once the package is available for Fedora, can you please update here on how Fedora users can install Bookworm so that I can add the instructions to the Bookworm website.

Thanks again for your help in making Bookworm available on Fedora.

bhepple commented 4 years ago

That's great news!

I'll get back onto the new code tomorrow (it's late here in Aus)

Cheers

Bob

On Sun, 12 Apr 2020 at 17:47, Siddhartha Das notifications@github.com wrote:

Closed #307 https://github.com/babluboy/bookworm/issues/307.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/babluboy/bookworm/issues/307#event-3224855391, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQ6U2TY2ONFOKDHDWQZRMDRMFWXVANCNFSM4MEJWWPA .

bhepple commented 4 years ago

Hi Siddhartha,

The new python scripts work on my (very limited) collection of .mobi files. Have you been able to test against DRM-protected .mobi files?

I will resume packaging soon - in the meantime, fedora-31 and -32 users can install the COPR version (with python backported from master) with:

sudo dnf copr enable wef/bookworm sudo dnf install bookworm

Cheers

Bob

On Sun, 12 Apr 2020 at 17:46, Siddhartha Das notifications@github.com wrote:

@bhepple https://github.com/bhepple I have updated the mobi unpack library to the new version which works with Python2.7/Python3. If you can compile and test the latest code, the mobi files should now open with Bookworm.

Hopefully this resolves the issue and you can continue to package Bookworm for Fedora. Let me know in case of further issues and also once the package is available for Fedora, can you please update here on how Fedora users can install Bookworm so that I can add the instructions to the Bookworm website.

Thanks again for your help in making Bookworm available on Fedora.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/babluboy/bookworm/issues/307#issuecomment-612577607, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQ6U2RAA5QJLQIHD3YLMJTRMFWU7ANCNFSM4MEJWWPA .