Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 12-25-2011, 12:27 PM   #1
Loeffel
Connoisseur
Loeffel began at the beginning.
 
Loeffel's Avatar
 
Posts: 58
Karma: 10
Join Date: Mar 2011
Device: Kindle 3 3G
Template for transfering books is ignored

Hi I just wonder what I am doing wrong. I try to select the path a book is saved onto my Kindle depending if it is coming from a series of books or not. So I changed the template under
'Preferences' => 'Sending book to devices'

My first program code was:

PHP Code:
program:
    
test(
        
field('series'),
        
'{series}/{series} - Band_{series_index} - {authors} - {series_index}_{title}',
        
'{author_sort}/{title} - {authors}'
    

then I changed the testing field and tried:

PHP Code:
program:
    
test(
        
field('series_index'),
        
'{series}/{series} - Band_{series_index} - {authors} - {series_index}_{title}',
        
'{author_sort}/{title} - {authors}'
    

after that I changed the programming and tried:

PHP Code:
program:
    
test(
        
ifempty(field('series_index'),'1'),
        
'{author_sort}/{title} - {authors}',
        
'{series}/{series} - Band_{series_index} - {authors} - {series_index}_{title}'
    

because all that failed I finally put in:

PHP Code:
{author_sort}/{title} - {authors
I was shocked to see that the result was in all cases the same! Calibre always uses
PHP Code:
{series}/{series} - Band_{series_index} - {authors} - {series_index}_{title
as template. Sonething I totally do not understand as changing the template was never a problem.
Until now I switched between those to templates manually before uploading books to my Kindle. Now it doesn't work anymore. I am confused.
I wanted to make the switching automatically by programming a script, but now it doesn't work at all.

I found somewhere in the forum that it should be set on 'Save books to disk' too, but even that doesn't change anything. :-(
The programming would be so useful and I used it already to set 'column' colors.


By the way, it is possible to delete the templates, that aren't used anymore?
Loeffel is offline   Reply With Quote
Old 12-25-2011, 02:40 PM   #2
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
You need to tell calibre that the strings on lines 4 and 5 are sub-templates, not constant strings. The template should be
Code:
program:
    test(
        field('series'),
        template('{series}/{series} - Band_{series_index} - {authors} - {series_index}_{title}'),
        template('{author_sort}/{title} - {authors}')
    )
Also make sure that the template is not set in the kindle plugin (preferences -> plugins -> device interface plugins -> kindle (the right one)). The template in the plugin overrides the template in send-to-device.
chaley is offline   Reply With Quote
Advert
Old 12-25-2011, 04:17 PM   #3
Loeffel
Connoisseur
Loeffel began at the beginning.
 
Loeffel's Avatar
 
Posts: 58
Karma: 10
Join Date: Mar 2011
Device: Kindle 3 3G
Thanks! Now it works as expected.

Do you know if there is a way to delete the old (wrong) settings from the list?
Loeffel is offline   Reply With Quote
Old 12-25-2011, 04:22 PM   #4
Loeffel
Connoisseur
Loeffel began at the beginning.
 
Loeffel's Avatar
 
Posts: 58
Karma: 10
Join Date: Mar 2011
Device: Kindle 3 3G
I found it, it is stored in the gui.py. I could delete it. Now the defect entries are gone.
Loeffel is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Transfering your books to a new Kindle Stingo Amazon Kindle 1 10-07-2011 05:12 PM
Transfering ebooks STL Droid enTourage Archive 10 02-24-2011 11:30 AM
Save template for sending books to Kindle 3 Eaglebeak60 Devices 2 02-14-2011 06:12 PM
Transfering books from Sony Library to Calibre onebookie Calibre 13 07-14-2010 02:52 PM
Optional characters in Save Template for Adding Books Starson17 Calibre 1 02-28-2010 12:52 PM


All times are GMT -4. The time now is 05:57 PM.


MobileRead.com is a privately owned, operated and funded community.