View Single Post
Old 08-14-2022, 01:55 PM   #371
killo3967
Member
killo3967 began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Sep 2020
Device: Kindle Paperwhite
Quote:
Originally Posted by enriquep View Post
Hello everyone.

I am tyrying to add Lecturalia as a source to the plugin (www.lecturalia.com, an acceptable reference site for Spanish language books). Lecturalia's search URL is
Code:
http://www.lecturalia.com/libros/s/book-title-in-lowercase
After several attempts from my side (including browsing the messages in this thread, trying to understand the basics of the "calibre template language" as explained in its help webpage, experimenting with this and that code...) I haven't been able to solve my problem, and I confess that I am still 99% lost with tokens, functions, etc. However, it seems to me that it must be VERY simple (¿?), so sorry for asking and thank you for your time.

I've managed to replace the +'s that the plugin puts in the title spaces by -'s, as required by this particular website:
Code:
http://www.lecturalia.com/libros/s/{title:re(\+,-)}
BUT i still need to make another change: the "book-title" chain has to be in lowercase. I am aware that there is a lowercase() function, and I've tried combining it with the re(\+,-)... unsuccessfully for now.

Any hints will be very appreciated.

Best from sunny Madrid,
-Enrique
Hi enrique.

I'm not in phyton, and anyone reading this is likely to cut their wrists, but this work for me.

Code:
http://www.lecturalia.com/libros/s/{title:'lowercase(re(re(re(re(re(re($,"ú","u" ),"ó","o" ),"í","i" ),"é","e" ),"á","a" )," ","-" ))'}
killo3967 is offline   Reply With Quote