![]() |
#1 |
Enthusiast
![]() Posts: 31
Karma: 10
Join Date: May 2010
Device: iPhone Marvin, Marvin 3
|
Calibre Template and Series
When I'm saving a series to disk, I like to use the following template:
{author_sort}/{series}/{series_index:0>2s}-{title} However, when I'm saving books that aren't part of a series, the file name has a leading dash in it. Is there any way to set up the template so that if there is a series index, I get 01-<title>, 02-<title>, ... and if there isn't, all I get for the file name is <title> ? Any help appreciated. Thank you. |
![]() |
![]() |
![]() |
#2 |
Enthusiast
![]() Posts: 31
Karma: 10
Join Date: May 2010
Device: iPhone Marvin, Marvin 3
|
Never mind. I found a template in a thread about saving series and changed it to work my way:
{author_sort}/{series:||/}{series_index:re(^(\d)(\.|$),0\1\2)||-}{title} Is there a guide to the regular expressions that can be built in calibre? |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,334
Karma: 58000000
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
and http://manual.calibre-ebook.com/regexp.html |
|
![]() |
![]() |
![]() |
#4 | |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
All about using regular expressions in calibre The calibre template language Last edited by DoctorOhh; 09-15-2013 at 10:48 PM. |
|
![]() |
![]() |
![]() |
#5 |
Enthusiast
![]() Posts: 31
Karma: 10
Join Date: May 2010
Device: iPhone Marvin, Marvin 3
|
Thank you. Much appreciated.
|
![]() |
![]() |
Advert | |
|
![]() |
Tags |
save file, series |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Save Template, {series} etc Always Empty | dbareis | Library Management | 13 | 07-01-2013 07:27 PM |
Calibre and page-template.xpgt | icecreamassassin | Conversion | 20 | 05-01-2013 11:55 PM |
Library name as calibre template variable | mdb5972 | Calibre | 6 | 01-15-2011 03:09 PM |
save file template for series | bucsie | Calibre | 2 | 11-08-2010 02:07 AM |