View Single Post
Old 12-02-2015, 09:51 AM   #138
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,816
Karma: 6000000
Join Date: Nov 2009
Device: many
Hi AlPe,

Have you thought of making aeneas code work on both Python2.7 and Python 3.4 from the same code base. It is simply not that hard to do, and some Linux distributions are moving away from installing python 2.7 at all. There are a number of packages that can help make the transition easier, including six, and own own compatibility_utils libraries. I would also be happy to help convert it to run on both if you run into any issues. We have done that with almost all of our plugins since Sigil's support for Python 2.7 may go away at some point as it is redundant given the embedded Python 3.4 interpreter.

If you do make that conversion in your code, you could then invoke it via a python subprocess or even directly import the code from the zip.

Please note, although epub3-itizer does not use much of them, there is a settings module and tk gui elements module that can be used to make the plugin more interactive if that is something you need.

KevinH

Quote:
Originally Posted by AlPe View Post
Thank you for the quick reply.

Good, I will fork the repo, code the part for handling MO under cases 1. and 2., and open a pull request.

(BTW, aeneas is released under the AGPLv3, and it works on Linux, Windows and OS X, albeit it currently requires Python 2.7.x. In any case, it will be used outside Sigil. My idea is to create a Sigil plugin that will create an "aeneas Job" from the current EPUB --- basically, a ZIP file with the appropriate resources to compute the SMIL files --- so that the user could run aeneas on it outside Sigil, and import back the computed SMIL files.)
KevinH is offline   Reply With Quote