View Single Post
Old 06-21-2020, 03:16 AM   #374
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by nico1989 View Post
There is a fix that could be applied to the plugin. The regular expression to identify ISBNs(file scan.py) could be changed to this:

RE_ISBN = re.compile(
r'97[89]{1}(?:-?\d){10}|\d{9}[0-9X]{1}|'
r'[-0-9X]{10,16}', re.I | re.M | re.S)

I try modifying and zipping it again with this change. But the new zip gives me an error when I import it.

Could this fix be applied?
No, I don't think that is a good idea. That regex is looking for any string of characters that might be an ISBN. Once they are found, the plugin is using core calibre routines to check if it is actually an ISBN. I didn't create that regex, but, I assume it was done from experience of how inconsistently ISBNs can be formatted.

And my apologies for not responding to this earlier. I've just realised I had a few beta's out there that I should actually released, and had forgotten about this.
davidfor is offline   Reply With Quote