View Single Post
Old 05-31-2022, 11:02 AM   #7206
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,999
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by ownedbycats View Post
For this fanfic, I was trying to change the description so that the two links pointed to my local copies of the fic.

Code:
[https://archiveofourown.org/works/34149469]
add_to_replace_metadata:
 description=>\"https://archiveofourown\.org/works/32414443\">=>\"calibre://show-book/_hex_-4d795f426f6f6b73/3424\"
However, it resulted in the link getting deleted entirely ("and Fred's .").

Did I mess up, or is it just not possible to modify the html like this?
Wow. Does it get lonely being that far out there?

Don't escape the " chars, it isn't needed. And you are removing the trailing > of the a tag, but not replacing it. Fix those and the substitution works; I could see the changed URL in description. But I couldn't test the link because I have no idea how to get the calibre UUID for a book.
JimmXinu is offline   Reply With Quote