View Single Post
Old 10-16-2014, 06:14 PM   #4
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,783
Karma: 30237628
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@bittenfig - OK, what you need is a Regular Expression to pull apart the title column into the two components main title and subtitle, embedded within a Template.

See ==>> All about using regular expressions in calibre

See ==>> The calibre template language — Single Function Mode. Scroll down and you'll see this function

Quote:
re(pattern, replacement) – return the field after applying the regular expression. All instances of pattern are replaced with replacement. As in all of calibre, these are python-compatible regular expressions.
I don't claim any proficiency at formulating RegEx's or Templates - I muddle through by trial and error.

But there are regular contributors here who have expertise at both, hopefully one or other should be able to provide the magic bullets.

You might find something useful in this thread ==>> Plugboard, template, and custom composite column recipes

BR

Last edited by BetterRed; 10-16-2014 at 06:19 PM.
BetterRed is online now   Reply With Quote