Quote:
Originally Posted by Ted Friesen
Thanks for the code Paul.
It sounds like you didn't code the function you sent me, but that it was "built-in". When I choose any of the dozen or so built-in functions the code is always the same
def replace(match, number, file_name, metadata, dictionaries, data, functions, *args, **kwargs):
return ''
Does your installation of Calibre actually display appropriate function code when you choose different built-in functions? If so, any ideas why?
|
Quote:
Originally Posted by Ted Friesen
From recent replies, it seems that clicking on create/edit regex-function should reveal the code for built-in functions. My installation (Calibre 4.19 64-bit on Microsoft Windows [Version 10.0.18363.900]) does not.
Any ideas why? Have I turned something off inadvertently? Have I failed to install some module?
|
What you have above looks like the default code if you open the function editor without a name in the "Function" field in the find box. And if you then use the "Function name" dropbox to select another function, it doesn't update the displayed code. I don't know if that is deliberate or not. I can see it working either way. If you select the function name in the find box, and then open the function editor, you get the code for that function.
Quote:
Should I still be using OS/2?
|
If only we could
Quote:
Having some functions (more than what's in the manual) to play with will help me learn enough to fix my epub book library.
Any help you can give me (samples of code and search strings) will be greatly appreciated.
|
I don't have any useful examples. I've tried a couple of things, but, it's actually the search that ends up being the problem, not the update.