View Single Post
Old 01-02-2022, 04:56 PM   #9
ugosan
Junior Member
ugosan began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jan 2022
Device: Kobo
Hi lomkiri, you are fast as light
I'd like to install the new version of Calibre, unfortunately my OS doesn't support it.
I have modified the script because it was giving me "IndexError: no such group", but now it works fine:

Code:
def replace(match, number, file_name, metadata, dictionaries, data, functions, *args, **kwargs):
    start_at = 19
    n = int(match.group(1))
    if n >= start_at:
        return str(n-1)
    return match.group(0)
Thank you very much for your support.
ugosan is offline   Reply With Quote