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 08-31-2013, 05:54 PM   #1
StevieCoops
Junior Member
StevieCoops began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2013
Device: iPad
General Program Template

Can someone help me get this template into GPT format for Save to Disc

{author_sort:re(.,.,.):sublist(0,1,&)}/{series} {series_index:| [|] -} {title} ({pubdate}) /{title} - {authors}

It should remove periods at the end of Author_Sort as well as name the folder with only the first author
StevieCoops is offline   Reply With Quote
Old 09-29-2013, 09:02 PM   #2
dKodiak
Member
dKodiak began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Sep 2013
Device: Galaxy S4
Here is what you want... I was looking for the same thing and found it in a few different posts

{author_sort:'sublist(re($, '\.', ''),0,1,'&')'}/{series} {series_index:| [|] -} {title} ({pubdate}) /{title} - {authors:re($, '\.', '')}

Example of output

for An Oblique Approach, Belisarius series 1 by David L. Drake & Eric Flint

Drake, David L/Belisarius [1] - An Oblique Approach (pub date)/An Oblique Approach - David L Drake & Eric Flint.epub
dKodiak is offline   Reply With Quote
Old 09-30-2013, 06:24 AM   #3
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by dKodiak View Post
Here is what you want... I was looking for the same thing and found it in a few different posts

{author_sort:'sublist(re($, '\.', ''),0,1,'&')'}/{series} {series_index:| [|] -} {title} ({pubdate}) /{title} - {authors:re($, '\.', '')}

Example of output

for An Oblique Approach, Belisarius series 1 by David L. Drake & Eric Flint

Drake, David L/Belisarius [1] - An Oblique Approach (pub date)/An Oblique Approach - David L Drake & Eric Flint.epub
Slight precision: the above template uses template program mode, not general program mode. In this case it is a good solution, but it wouldn't work properly if any of the function arguments were themselves template references.
chaley is offline   Reply With Quote
Old 09-30-2013, 11:02 PM   #4
StevieCoops
Junior Member
StevieCoops began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2013
Device: iPad
I tried that but still got EXCEPTION: Incorrect number of arguments for function re
StevieCoops is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Date formatting/template program mode bookworm2000 Library Management 4 12-28-2012 04:41 PM
Help with template KALKITO Library Management 1 07-02-2012 02:54 PM
Does anyone use "general program mode" template functions? chaley Library Management 0 08-16-2011 11:54 AM
A little help with a save template...? Belfaborac Library Management 2 02-04-2011 09:47 PM
Kindle DX Template Gideon Calibre 6 06-02-2009 12:52 AM


All times are GMT -4. The time now is 06:58 PM.


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