![]() |
#1 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,981
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Regex for a custom identifier breaking links
I have this identifier for Open Library books: https://openlibrary.org/books/{id}/
However, i came across a strange behaviour with it. See this: https://openlibrary.org/works/OL3965645W/Cats https://openlibrary.org/books/OL3965645W/Cats Though the ID works the same regardless, the URL may use either works or books. (Not sure why but i suspect it's to do with multiple editions.) If I paste in a URL with the wrong one, it fails to detect. If I use https://openlibrary.org/(books|works)/{id}/ it does detect correctly, but then breaks the clickable links in details. Any suggestions on what to do? ![]() Last edited by ownedbycats; 03-08-2021 at 09:59 PM. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,360
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
make two rules one for each type of url.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,981
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I did that, but now I have two duplicate identifiers for one value. Is that expected?
|
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,360
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Yes every matching rule produces an entry.
|
![]() |
![]() |
![]() |
#5 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,981
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Thank you
|
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Windows 10 - Default browser & identifier links | ownedbycats | Calibre | 2 | 08-26-2020 11:56 PM |
Custom font (PRS+) breaking itself | Ami_K | Sony Reader Dev Corner | 5 | 12-30-2018 07:17 AM |
Identifier-like custom column | nqk | Library Management | 5 | 05-20-2017 01:38 AM |
Regex for adding numbers to endnote links in Sigil | Bright Wing | Sigil | 12 | 04-25-2015 09:06 AM |
Square brackets in filename breaking Calibre Regex? | ccsrsj | Library Management | 2 | 06-02-2012 07:38 AM |