|
|
#1 |
|
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,369
Karma: 79528341
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 10:59 PM. |
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,622
Karma: 28549046
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
make two rules one for each type of url.
|
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,369
Karma: 79528341
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,622
Karma: 28549046
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Yes every matching rule produces an entry.
|
|
|
|
|
|
#5 |
|
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,369
Karma: 79528341
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Thank you
|
|
|
|
| Advert | |
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Windows 10 - Default browser & identifier links | ownedbycats | Calibre | 2 | 08-27-2020 12:56 AM |
| Custom font (PRS+) breaking itself | Ami_K | Sony Reader Dev Corner | 5 | 12-30-2018 08:17 AM |
| Identifier-like custom column | nqk | Library Management | 5 | 05-20-2017 02:38 AM |
| Regex for adding numbers to endnote links in Sigil | Bright Wing | Sigil | 12 | 04-25-2015 10:06 AM |
| Square brackets in filename breaking Calibre Regex? | ccsrsj | Library Management | 2 | 06-02-2012 08:38 AM |