View Single Post
Old 08-23-2020, 09:09 AM   #1851
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by anacreon View Post
I use this for the "comments/synopsis"
PHP Code:
{timestamp:|ajout calibre |<br>}{#lu:||<br>}{tags:}{comments} 
and this for the subtitles
PHP Code:
{#nb_page} pages 
I've also used this for years in calibre, in the "search and replace" for bulk metadata treatment:
search: {#nb_page} pages
search field: #nb_page
replace with: \1 pages<BR>_________________________
add to begin of comments field


Until a few F/W back I had to send this to the device once after the second connection after sending a new book, or after modifying the metadata, but now I have to resend it to all my books after every connection, or I loose the date added to calibre, the #lu information and the tags.
The last has nothing to do with the firmware. You probably have the metadata updating option turned on in the driver. That will update the metadata on the device with every connection. But, you can use those options. This uses the metadata plugboard. Set the comment to the template you have above. For the subtitle, this can't be done via a plugboard as it isn't a standard column. But, the driver has an option to set the subtitle using a template. Again, the above template should work there.

For your search-and-replace, I find that a horrible idea. It means the page count is at the start of the comments in the calibre library. But, if that is how you want it. The following template, either through the plugin or a metadata plugboard would achieve the same effect:

Code:
{timestamp:|ajout calibre |<br>}{#lu:||<br>}{tags:}{#nb_page} pages<br/>_________________________{comments}
Or maybe:

Code:
{timestamp:|ajout calibre |<br>}{#lu:||<br>}{tags:}{#nb_page} pages<br/><hr/>{comments}
My template above does a lot of this, except that it adds the HTML tag so it formats well. And checks the values exist before using them.
davidfor is offline