08-16-2010, 03:01 PM | #1 |
Junior Member
Posts: 7
Karma: 10
Join Date: Aug 2010
Device: iriver Story
|
Send to device template
Hi guys,
Sorry if this has been posted before (I've searched but found nothing relevant), but I have the following issue: I want to create a template that will add the book series and index to the filename, but only if they exist. I mean someting like: J Random Author - Single Book J Random Author - Unrelated Book J Random Author - Amazing Series 1 - I'm Doing a Trilogy, You Guys J Random Author - Amazing Series 2 - It's Gonna Be Awesome J Random Author - I Lost All My Inspiration The bolded bits are what give me trouble. See, I've looked at the Python templating, and came up with these two options: {authors} - {: $series - $series_index - }{title} {authors} - {: %series - %series_index - }{title} since that's what that page suggested. However, Calibre doesn't like either option, and my Python-fu is weak. So, can anyone give me a pointer? Thanks in advance Last edited by rockeh; 08-16-2010 at 03:08 PM. |
08-16-2010, 03:11 PM | #2 | ||
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Quote:
Code:
{series} {series_index} {authors} - {title} |
||
Advert | |
|
08-16-2010, 03:22 PM | #3 | |
Junior Member
Posts: 7
Karma: 10
Join Date: Aug 2010
Device: iriver Story
|
Aww
Quote:
Code:
{authors} - {series} {series_index} {title} Thank you [edit] Spelling. |
|
08-16-2010, 03:39 PM | #4 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
OS stripping of spaces only works at the beginning of the filename. I see you put it in the middle, so you don't get OS stripping, just multiple spaces, but it's better than random multiple hyphens. I put my author name in the folder/directory name, then put all my series together, followed by the title.
|
08-17-2010, 04:03 PM | #5 |
Junior Member
Posts: 7
Karma: 10
Join Date: Aug 2010
Device: iriver Story
|
Actually, that's worked as expected (ie, it removed the extra spaces in the filename). If it's relevant in any way, I'm using v 0.7.14 on Win 7 (64 bit version).
|
Advert | |
|
08-17-2010, 05:23 PM | #6 |
Grand Sorcerer
Posts: 6,216
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Please ignore (fat fingers)
|
08-17-2010, 05:28 PM | #7 | |
Grand Sorcerer
Posts: 6,216
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Code:
Save to disk/send to device templates: Always render {series_index} as an empty string when the book has no series. Closes tickets: 6409 |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
send to device without conversion? | jacktanner | Calibre | 29 | 08-27-2010 03:35 PM |
Send to Device (structure) | mgmueller | Calibre | 1 | 02-21-2010 01:54 PM |
template for "send to device" customization | sbin | Calibre | 8 | 01-07-2010 07:22 AM |
Non-destructive send to device? | caphector | Calibre | 6 | 07-31-2009 12:40 PM |
Send to device? Please don't kill me :) | macthekitten | Calibre | 11 | 12-27-2008 07:35 PM |