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 05-03-2015, 07:02 PM   #1
davidam2
Junior Member
davidam2 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: May 2015
Location: Barcelona
Device: Cool-er
Regex in Save book to eliminate more than 1 author

Hi!!

In SAVING BOOKS TO DISC, in Save Template I have:
{authors} - {series:|| }{series_index:0>2s|[|] }{title}

This line save books in disc with names (for example):
Author - Title
or
Author1 & Author2 - Serie [01] - Title.

Can I limit (with Regex, I suppose) to only 1 author, if the book have more than one? How?

Thanks a lot!!
davidam2 is offline   Reply With Quote
Old 05-03-2015, 07:51 PM   #2
davidam2
Junior Member
davidam2 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: May 2015
Location: Barcelona
Device: Cool-er
I Found it!!!
:sublist(0,1,&)

change the line:
{authors} - {series:|| }{series_index:0>2s|[|] }{title}

by:
{authors:sublist(0,1,&)} - {series:|| }{series_index:0>2s|[|] }{title}

Thanks and excuse me for the inconveniences
davidam2 is offline   Reply With Quote
Advert
Old 05-03-2015, 07:54 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,950
Karma: 60358908
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 davidam2 View Post
Hi!!

In SAVING BOOKS TO DISC, in Save Template I have:
{authors} - {series:|| }{series_index:0>2s|[|] }{title}

This line save books in disc with names (for example):
Author - Title
or
Author1 & Author2 - Serie [01] - Title.

Can I limit (with Regex, I suppose) to only 1 author, if the book have more than one? How?

Thanks a lot!!
You need to use the Powerful features of the Template Language

http://manual.calibre-ebook.com/template_lang.html
Read up, and maybe it will jump out at you before one of the experts posts
( My skill level is a 'maybe I can do a tweak to someones code')

Ninja'd that fast

Last edited by theducks; 05-03-2015 at 07:56 PM. Reason: Ninja'd
theducks is offline   Reply With Quote
Old 05-03-2015, 10:16 PM   #4
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
*puts on official template guru hat*

Yup, that is exactly my default overide. (sublisting all "authors" mentions)
eschwartz is offline   Reply With Quote
Old 05-03-2015, 10:42 PM   #5
davidam2
Junior Member
davidam2 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: May 2015
Location: Barcelona
Device: Cool-er
theducks
eschwartz
davidam2 is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding books - filename RegEx author FN (initials) LN Rob557 Library Management 8 10-16-2014 04:53 PM
RegEx for title - author - series? mattam Library Management 10 08-29-2012 11:11 PM
Regex search author field to locate books? Starson17 Calibre 2 12-21-2009 10:40 AM
libprs500 - title/author matching regex Megatron-UK Calibre 15 04-01-2008 04:39 PM


All times are GMT -4. The time now is 01:11 AM.


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