Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 04-20-2019, 11:37 AM   #1
DaltonST
Deviser
DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.
 
DaltonST's Avatar
 
Posts: 1,875
Karma: 1804640
Join Date: Aug 2013
Location: Texas
Device: 10" Win10 Tablet w/Calibre64, CalibreSpy & Freda+
Python 2 to Python 3, Polyglot & Plugins

Kovid,

For future planning purposes only, by what month/year will plugin developers need to have changed their Python 2 code to use "...\src\polyglot"?


When do you expect polyglot to become stable enough that plugin developers can begin using it and hence begin completely re-testing their plugins?


I have 15 plugins, so it is not something that can be done quickly and easily.


Thanks.



DaltonST
DaltonST is offline   Reply With Quote
Old 04-20-2019, 12:45 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 38,575
Karma: 17011946
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
polyglot is already stable, feel free to use it whenever you like.
kovidgoyal is online now   Reply With Quote
Advert
Old 04-20-2019, 03:48 PM   #3
jhowell
Wizard
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 4,183
Karma: 43405197
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Oasis 2, Fire, iPad Air 2, Nexus 7
I have questions about the planned Python 3 migration.

Are you going to put out a Python 3 beta version for Windows anytime soon?

Are you planning a hard cutover from 2 to 3 are you going to release both versions together for awhile?
jhowell is online now   Reply With Quote
Old 04-21-2019, 02:47 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 38,575
Karma: 17011946
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Not any time soon no. The python 3 port is nowhere near ready. If and when it is ready, there will be a long period when both python 2 and python 3 builds of calibre on all platforms will be available so people have time to port plugins and find regressions in the python 3 port.

At the moment the plan is that when the python 3 port is ready and many plugins have been ported, I will stop releasing python 2 builds and all future calibre releases will be python 3 based.

Note however that this is very early stages, these plans might change depending on ground realties. The one this that is certain is that I do intend to provide at least a few months for plugin porting.

Last edited by kovidgoyal; 04-21-2019 at 02:54 AM.
kovidgoyal is online now   Reply With Quote
Old 04-21-2019, 04:10 AM   #5
jhowell
Wizard
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 4,183
Karma: 43405197
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Oasis 2, Fire, iPad Air 2, Nexus 7
Thanks. That sounds great.
jhowell is online now   Reply With Quote
Advert
Old 04-22-2019, 03:14 PM   #6
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,406
Karma: 84720178
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Note that you don't actually need to use polyglot at all, but if you do, it's simple enough to just import from it and bump the minimum calibre version. But they are mostly pretty simple things.

I'd suggest going forward, to reduce the cognitive burden you should rely on any __future__ imports available (especially unicode_literals), make sure to mark all relevant strings as b'' and use modern python idioms that work natively on both. The latter two are things that any relatively recent code should probably have been doing anyway.

...

It's quite easy to reimplement the bits that you need, since they are, by and large, very simple try/except blocks. You could also rely on the fact that calibre has always had dependencies (dateutil, more recently html5lib) which require python-six, and just import needed functionality from e.g. six.moves which would make things a lot simpler. I think six 1.10 has been available at a minimum since a very long time...

Kovid has decided that he does not wish to rely on python-six, but you're not required to hold the same opinions.

Note: polyglot has been available since calibre 3.32 with the following contents (many more things were only added in the latest release):

Code:
from polyglot.builtins import is_py3, reraise, zip, map, filter, iteritems, iterkeys, itervalues
from polyglot.urllib import urlopen, urlencode
eschwartz is offline   Reply With Quote
Old 04-22-2019, 04:34 PM   #7
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 5,722
Karma: 14352820
Join Date: Sep 2009
Location: UK
Device: Kobo: H2O, GloHD, KA1, ClaraHD, Forma
Quote:
Originally Posted by eschwartz View Post
... I'd suggest going forward, to reduce the cognitive burden you should rely on any __future__ imports available (especially unicode_literals), make sure to mark all relevant strings as b'' ...
Hi eschwartz,

I've read the above many times and I still don't really understand what you're saying. I'm pretty sure the problem is at my end
  1. All my plugin .py files have this as the first line:
    Code:
    from __future__ import (unicode_literals, division, absolute_import, print_function)
    Are you saying this will still be OK in Python 3?

  2. When do you need the b'' thing? Can you give an example of Python2 vs 3 where it would be needed?

  3. Re: polyglot.builtins iteritems, iterkeys, itervalues.
    I have a lot of code that looks something like:
    Code:
    for k,v in dict.iteritems():
        do something with k and v
    Is there some reason why the following minor change wouldn't work OK in both Py2 and Py3?
    Code:
    for k,v in dict.items():
        do something with k and v
jackie_w is offline   Reply With Quote
Old 04-22-2019, 11:42 PM   #8
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,406
Karma: 84720178
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
1) Yes! All __future__ imports are defined by the python language committee to always remain valid, in perpetuity. https://docs.python.org/3/library/__future__.html

Quote:
Originally Posted by The Python Software Foundation
No feature description will ever be deleted from __future__. Since its introduction in Python 2.1 the following features have found their way into the language using this mechanism:
Some __future__ imports are no-ops since as early as python 2.2. They denote that the feature became mandatory in a given version, and thereafter serve as executable documentation that such and such a thing happened, once.
You're doing everything you need to, here.

However, there are other cases where you need simple modernization. For example, in several cases your ScrambleEbook plugin uses the idiom:

Code:
raise MyException, errmsg
This is considered to be "old-style" in python2, and is fully removed in python3. On python3 it returns:

Code:
  File "/home/eschwartz/git/calibre/src/calibre/customize/zipplugin.py", line 182, in load_module
    import_name), 'exec', dont_inherit=True)
  File "calibre_plugins.scrambleebook_plugin.action", line 117
    raise SelectedBookError, errmsg
                           ^
SyntaxError: invalid syntax
This will work on both, and is preferred even in python2:

Code:
raise MyException(errmsg)
3) This change will indeed work on both python2 and python3. However, it misses the point of why one would want to use iteritems on python2: it is more efficient and uses less memory to use an iterator.

Code:
# python2
>>> {"one":"two", "three": "four"}.items()
[('three', 'four'), ('one', 'two')] # this is a list
>>> {"one":"two", "three": "four"}.iteritems()
<dictionary-itemiterator object at 0x7f6874c5f940> # this is an iterator
>>> {"one":"two", "three": "four"}.viewitems()
dict_items([('three', 'four'), ('one', 'two')])  # this is an iterator
# python3
{"one":"two", "three": "four"}.items()
dict_items([('one', 'two'), ('three', 'four')])  # this is an iterator
The dictionary-itemiterator and dict_items do not create an extra list, which you then toss away. OTOH that also makes it useless in many other cases, since you cannot count len(foo) or index foo[0], if foo is not even a list. (It is curious to note, that iteritems, an iterator, does not have a len, but dict_items which is the native python3 items() and the backported python2 viewitems, and is a view object, does have a len, but is still not subscriptable as foo[0] either way.)

So you trade inefficiency for portability if you use a simple items().

2) b'' strings are for example what you get if you:

Code:
>>> with open('filename', 'wb') as f:
>>>     f.write('Hello World')
TypeError: a bytes-like object is required, not 'str'
Which matters a great deal for people working with files. Also, by default, lxml.etree processing works with byte types.

One example of an article discussing the difference and why it matters, is here: https://medium.com/@andreacolangelo/...w-27dc02ff2686

To use a practical example, after I updated your plugin to use "raise SelectedBookError(errmsg)", and updated all dict.iteritems() to use from polyglot.builtins import iteritems (requires calibre >= 3.41.0) and iteritems(dict), I still got the following message. But this came from calibre itself.

Code:
Traceback (most recent call last):
  File "calibre_plugins.scrambleebook_plugin.action", line 161, in show_dialog
  File "calibre_plugins.scrambleebook_plugin.scrambleebook", line 189, in __init__
  File "calibre_plugins.scrambleebook_plugin.scrambleebook", line 256, in initialise_new_file
  File "calibre_plugins.scrambleebook_plugin.scrambleebook", line 1094, in get_run_check_error
  File "/home/eschwartz/git/calibre/src/calibre/ebooks/oeb/polish/check/main.py", line 81, in run_checks
    errors += check_opf(container)
  File "/home/eschwartz/git/calibre/src/calibre/ebooks/oeb/polish/check/opf.py", line 373, in check_opf
    n, c = raw.index('name="'), raw.index('content="')
TypeError: argument should be integer or bytes-like object, not 'str'
Now let us take a look at that line in calibre: https://github.com/kovidgoyal/calibr...ck/opf.py#L373

raw.index is acting on
Code:
raw = etree.tostring(cover)
etree.tostring returns a bytestring, and calibre then tries to index it using a simple str() type, denoted by
Code:
'name="'
This does not work -- on python2, str and bytes are the same, but on python3, str is of type unicode, which is not comparable to bytes, and the solution is to index it using
Code:
b'name="'
This will be fixed by the following commit in calibre (which is currently in my fork, but I will PR it soon): https://github.com/eli-schwartz/cali...2d483a654b56ef
EDIT: now officially merged: https://github.com/kovidgoyal/calibr...0543e13ef72ac0

The final fix to make the ScrambleEbook plugin work flawlessly AFAICT is to replace all use of unicode() with unicode_type() as imported from polyglot.builtins once again. Although when you used 'mystring %s' % unicode(len(foo)), you can simply drop the unicode cast. You can directly format the string using an integer returned by len() without first converting it to a unicode string.

Last edited by eschwartz; 04-23-2019 at 02:09 AM.
eschwartz is offline   Reply With Quote
Old 04-23-2019, 01:55 AM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 38,575
Karma: 17011946
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I should note that a good way to find many of the more common/simple things that need changing and even to change them automatically in your plugin's python files is to use the modernize tool

https://python-modernize.readthedocs...est/index.html

or the 2to3 tool

https://docs.python.org/3/library/2to3.html

This tool however will make your files incompatible with python 2 so it should be used to detect issues only, not fix them automatically.
kovidgoyal is online now   Reply With Quote
Old 04-23-2019, 07:52 AM   #10
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 5,722
Karma: 14352820
Join Date: Sep 2009
Location: UK
Device: Kobo: H2O, GloHD, KA1, ClaraHD, Forma
@eschwartz,
Thank you very much for explaining things. It was good of you to take the time with such a detailed reply It looks like there are a few things I can be working on to tidy up my old-fashioned code. Most of my plugins are not publicly shared so I can experiment without upsetting anyone if/when I make mistakes.

@kovid,
Thank you for the links The homework should keep me busy for a while.
jackie_w is offline   Reply With Quote
Old 04-23-2019, 08:31 AM   #11
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 61,409
Karma: 84262626
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, PRS-650, PRS-T1, nook STR, iPad 4, iPhone SE 2020, PW3
Quote:
Originally Posted by jackie_w View Post
@eschwartz,
Thank you very much for explaining things. It was good of you to take the time with such a detailed reply It looks like there are a few things I can be working on to tidy up my old-fashioned code. Most of my plugins are not publicly shared so I can experiment without upsetting anyone if/when I make mistakes.

@kovid,
Thank you for the links The homework should keep me busy for a while.
What plugins have you written for your own use? Maybe some of them might be of use to others.
JSWolf is online now   Reply With Quote
Old 04-23-2019, 09:43 AM   #12
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 5,621
Karma: 5806517
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by jackie_w View Post
@eschwartz,
Thank you very much for explaining things. It was good of you to take the time with such a detailed reply It looks like there are a few things I can be working on to tidy up my old-fashioned code. Most of my plugins are not publicly shared so I can experiment without upsetting anyone if/when I make mistakes.
Thank you for reminding me that I have plugins too (private and public)
Terisa de morgan is offline   Reply With Quote
Old 04-23-2019, 03:05 PM   #13
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 5,722
Karma: 14352820
Join Date: Sep 2009
Location: UK
Device: Kobo: H2O, GloHD, KA1, ClaraHD, Forma
Quote:
Originally Posted by JSWolf View Post
What plugins have you written for your own use? Maybe some of them might be of use to others.
Yes, they might, but there are a variety of reasons why sharing to the public can be problematic. Mainly:
  • some of them are variations on existing plugins (Modify Epub, KoboTouchExtended, EpubCheck) so I'm not going to tread on the toes of the original creators or other noble souls who try to maintain orphaned plugins.
  • some of them have some overlap with standard calibre (e.g. epub-to-kepub, kepub-to-epub, epub2-to-epub3). I prefer to avoid confusing anyone.
  • a lot of my Editor Tool plugins may not work 100% for all users, for all epubs. Not a problem when I'm using them myself because I know the limitations. On the first day of public release I'd probably be inundated with complaints about the 1% of corner cases that I don't care about (you'd probably be first in the queue ). This is when programming as a fun retirement hobby turns into PITA programming as real work. I've no desire to spend large amounts of time creating error-checks for people who might do something dumb or who just prefer to edit epubs differently to me. I'll leave the all-singing, all-dancing plugins to the professionals.

Having said all that I'm always happy to share code with other plugin hobbyists as a base for creating their own stuff. But I don't want ongoing maintenance responsibility - especially now - during the transition from python 2 to 3.
jackie_w is offline   Reply With Quote
Old 04-23-2019, 03:21 PM   #14
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 5,621
Karma: 5806517
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by jackie_w View Post
a lot of my Editor Tool plugins may not work 100% for all users, for all epubs. Not a problem when I'm using them myself because I know the limitations. On the first day of public release I'd probably be inundated with complaints about the 1% of corner cases that I don't care about (you'd probably be first in the queue ). This is when programming as a fun retirement hobby turns into PITA programming as real work. I've no desire to spend large amounts of time creating error-checks for people who might do something dumb or who just prefer to edit epubs differently to me. I'll leave the all-singing, all-dancing plugins to the professionals.
I totally, totally understand you.
Terisa de morgan is offline   Reply With Quote
Old 04-23-2019, 03:23 PM   #15
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 5,621
Karma: 5806517
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by jackie_w View Post
Yes, they might, but there are a variety of reasons why sharing to the public can be problematic. Mainly:
  • some of them are variations on existing plugins (Modify Epub, KoboTouchExtended, EpubCheck) so I'm not going to tread on the toes of the original creators or other noble souls who try to maintain orphaned plugins.
  • some of them have some overlap with standard calibre (e.g. epub-to-kepub, kepub-to-epub, epub2-to-epub3). I prefer to avoid confusing anyone.
  • a lot of my Editor Tool plugins may not work 100% for all users, for all epubs. Not a problem when I'm using them myself because I know the limitations. On the first day of public release I'd probably be inundated with complaints about the 1% of corner cases that I don't care about (you'd probably be first in the queue ). This is when programming as a fun retirement hobby turns into PITA programming as real work. I've no desire to spend large amounts of time creating error-checks for people who might do something dumb or who just prefer to edit epubs differently to me. I'll leave the all-singing, all-dancing plugins to the professionals.

Having said all that I'm always happy to share code with other plugin hobbyists as a base for creating their own stuff. But I don't want ongoing maintenance responsibility - especially now - during the transition from python 2 to 3.
BTW... I would be interested in those editor plugins... so I can see how they work and perhaps evolve them to my own use cases.....
Terisa de morgan is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Python error & now Book Details is on the Side wildoatz Devices 4 06-27-2017 09:46 PM
Python + PyQt enviroment for Kindle & PaperWhite devices. bosito7 Kindle Developer's Corner 8 11-26-2016 04:43 AM
KTerm & Python Issues aBP Kindle Developer's Corner 4 02-10-2016 06:23 PM
Python help please AndyW1691 Library Management 3 02-08-2012 10:51 AM
Plugins and optional Python modules pdurrant Plugins 14 03-02-2010 04:28 AM


All times are GMT -4. The time now is 09:02 AM.


MobileRead.com is a privately owned, operated and funded community.