Quote:
Originally Posted by nico1989
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.