Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 09-15-2013, 02:15 PM   #1
sehlat
Enthusiast
sehlat began at the beginning.
 
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.
sehlat is offline   Reply With Quote
Old 09-15-2013, 02:25 PM   #2
sehlat
Enthusiast
sehlat began at the beginning.
 
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?
sehlat is offline   Reply With Quote
Advert
Old 09-15-2013, 04:01 PM   #3
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
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:
Originally Posted by sehlat View Post
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?
You mean http://manual.calibre-ebook.com/template_lang.html

and
http://manual.calibre-ebook.com/regexp.html
theducks is offline   Reply With Quote
Old 09-15-2013, 10:29 PM   #4
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by sehlat View Post
Is there a guide to the regular expressions that can be built in calibre?
Yes.

All about using regular expressions in calibre

The calibre template language

Last edited by DoctorOhh; 09-15-2013 at 10:48 PM.
DoctorOhh is offline   Reply With Quote
Old 09-16-2013, 11:21 AM   #5
sehlat
Enthusiast
sehlat began at the beginning.
 
Posts: 31
Karma: 10
Join Date: May 2010
Device: iPhone Marvin, Marvin 3
Thank you. Much appreciated.
sehlat is offline   Reply With Quote
Advert
Reply

Tags
save file, series


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 03:18 AM.


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