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 09-05-2015, 10:14 AM   #1
Hoods7070
Groupie
Hoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notes
 
Posts: 159
Karma: 24430
Join Date: Mar 2012
Location: Australia
Device: Nexus 7"
How to swop LN,FN to FN LN in template

Someone told me how to do this ages ago, but I've long since lost that template. Please can someone tell me where and exactly what to append to {author} in a template to swop LN,FN to FN LN. (By default my library is in LN,FN order.)

Many thanks
Hoods7070 is offline   Reply With Quote
Old 09-05-2015, 11:08 AM   #2
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: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
use {author_sort} for Export
This does not affect the Library

Preferences: Adding books for adding options
The Quality check PI for author Fixing tools
theducks is offline   Reply With Quote
Advert
Old 09-05-2015, 12:17 PM   #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,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Hoods7070 View Post
Someone told me how to do this ages ago, but I've long since lost that template. Please can someone tell me where and exactly what to append to {author} in a template to swop LN,FN to FN LN. (By default my library is in LN,FN order.)
I assume you are saying that your authors are in LN, FN order and that your library is sorted in LN, FN order. This means that both the author and author_sort columns are LN, FN. If this is the case, use the swap_around_comma template function
Code:
{author:swap_around_comma()}
chaley is offline   Reply With Quote
Old 09-06-2015, 04:43 AM   #4
Hoods7070
Groupie
Hoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notes
 
Posts: 159
Karma: 24430
Join Date: Mar 2012
Location: Australia
Device: Nexus 7"
Quote:
Originally Posted by theducks View Post
use {author_sort} for Export
This does not affect the Library
Thanks - I already do that. However, that affects only the exported folder titles, as far as I can see, and what I am after is changing the display in the jacket.

I am just exploring alternatives and trying to get to understand templates better, with limited success so far.

Last edited by Hoods7070; 09-06-2015 at 04:56 AM.
Hoods7070 is offline   Reply With Quote
Old 09-06-2015, 07:27 AM   #5
Hoods7070
Groupie
Hoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notes
 
Posts: 159
Karma: 24430
Join Date: Mar 2012
Location: Australia
Device: Nexus 7"
Quote:
Originally Posted by chaley View Post
I assume you are saying that your authors are in LN, FN order and that your library is sorted in LN, FN order.
That is indeed what I was saying.

Quote:
This means that both the author and author_sort columns are LN, FN.
Yes. Given that, I am now **assuming** I should be adding/substituting the "BuiltinSwapAroundComma" function you gave me into this line of code in my calibre jacket template:

Code:
<td class="cbj_author" colspan="2">{author}</td>
Where and exactly how should I change that, please? Indeed is that even where I need to add the function?? I have tried various things with {author}, none of which works for me. Should I have a value(s) between the parentheses in

Code:
 {author:swap_around_comma()}
and if so what?

Previously, I had added a hidden column containing FN LN (sans comma) and called that from my jacket template, but I am darned if I can remember or find out how to add that second author column correctly. Again, I have tried various things (adding custom column) to no useful avail. I think BetterRed helped me out, but can't find the relevant thread.

Sorry to be so dim. Old age is a b**ch.
Hoods7070 is offline   Reply With Quote
Advert
Old 09-06-2015, 07:30 AM   #6
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: 29,809
Karma: 54830978
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 Hoods7070 View Post
Thanks - I already do that. However, that affects only the exported folder titles, as far as I can see, and what I am after is changing the display in the jacket.

I am just exploring alternatives and trying to get to understand templates better, with limited success so far.
You may need to make a hack of the Jacket code.
Remember to put code hacks (substitutes) into the Calibre Configuration folder using the exact same program relative path. That way is safe against being overwritten during weekly upgrades (although, it might fail at some future time) .
theducks is offline   Reply With Quote
Old 09-06-2015, 07:45 AM   #7
Hoods7070
Groupie
Hoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notes
 
Posts: 159
Karma: 24430
Join Date: Mar 2012
Location: Australia
Device: Nexus 7"
Quote:
Previously, I had added a hidden column containing FN LN (sans comma) and called that from my jacket template, but I am darned if I can remember or find out how to add that second author column correctly. Again, I have tried various things (adding custom column) to no useful avail. I think BetterRed helped me out, but can't find the relevant thread.
OK I got the second custom column OK, named "fnln". I am now trying to figure out/remember how to add THAT to my template line.
Hoods7070 is offline   Reply With Quote
Old 09-06-2015, 07:50 AM   #8
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,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Hoods7070 View Post
Yes. Given that, I am now **assuming** I should be adding/substituting the "BuiltinSwapAroundComma" function you gave me into this line of code in my calibre jacket template:
Ahhh. You didn't say that you were working with a jacket template. Jackets do not support the template language.
Quote:
Previously, I had added a hidden column containing FN LN (sans comma) and called that from my jacket template, but I am darned if I can remember or find out how to add that second author column correctly. Again, I have tried various things (adding custom column) to no useful avail. I think BetterRed helped me out, but can't find the relevant thread.
You would use a "Column built from other columns". The template would be the one I showed in post 3. You would then follow the instructions in template.xhtml to include that value on the jacket. Assuming that your custom column has the lookup name #myauthor I think that you would add something like
Code:
            	<tr>
            		<td class="cbj_author" colspan="2">{_myauthor}</td>
            	</tr>
I don't use the jacket feature so I don't have first-hand experience with it.

EDIT: I hadn't seen your last post. Try _fnln where I put _myauthor
chaley is offline   Reply With Quote
Old 09-06-2015, 08:11 AM   #9
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: 20,575
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Hoods7070 View Post
I think BetterRed helped me out, but can't find the relevant thread.
@Hoods7070 - if you say so, I can't recall it nor can I find it, but sin taxes all of us I guess

But chaley has given you the answer - I do have a vague memory that on first sight 'swap around comma' reminded me of Arlo Guthrie's "Ring around Rosie Rag" from Alice's Restaurant.

BR

'Age cannot wither her, nor custom stale' , Shakespeare, Antony and Cleopatra
BetterRed is offline   Reply With Quote
Old 09-06-2015, 06:29 PM   #10
Hoods7070
Groupie
Hoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notes
 
Posts: 159
Karma: 24430
Join Date: Mar 2012
Location: Australia
Device: Nexus 7"
@chaley_not_charley, AHAH!!! For the want of a flipping underscore!!! Added that and viola! (sic) - THANK you.

@ducks, I found that post, and had been hacking away, but it didn't contain the vital info -- chaley's underscore.

@br
Quote:
'Age cannot wither her, nor custom stale' , Shakespeare, Anthony and Cleopatra
Age HAS withered her.

As they say, when the age is in, the wit is out. Shakespeare, Much Ado About Nothing

Many thanks all of you.
Hoods7070 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete template imans314 Library Management 15 04-26-2023 09:01 PM
Template Generation BetterRed Library Management 4 10-02-2014 06:40 AM
Template suggestion? phossler Editor 1 06-21-2014 01:37 PM
Help with template KALKITO Library Management 1 07-02-2012 02:54 PM
A little help with a save template...? Belfaborac Library Management 2 02-04-2011 09:47 PM


All times are GMT -4. The time now is 04:49 AM.


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