grayleonard / booxtream-epub-drm-remover

Removes all "Social DRM" from booXtream ePub files
178 stars 28 forks source link

Python 3 support #10

Open Artoria2e5 opened 6 years ago

Artoria2e5 commented 6 years ago

This commit adds Python 3 (> 3.3?) support while retaining Python 2 compatibility. "Six" is used for easy version tests in Python; it's a single-file library that can be removed easily.

To make the "./cure.py" instruction actually work, a she-bang is added to cure.py.

Artoria2e5 commented 6 years ago

If something breaks, try removing the cure_str selective coercion on file stuff and just always open the files in binary mode instead.

Artoria2e5 commented 6 years ago

Instead of doing "from future" i should probably make everything explicit…

Artoria2e5 commented 6 years ago

Extended support to more python versions by replacing b'' and u'' with six.b() and six.u().