![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,013
Karma: 251649
Join Date: Apr 2010
Location: Tempe, AZ, USA, Earth
Device: JetBook Lite (away from home) + 1 spare, 32" TV (at home)
|
Changing from author first, last to last, first
From what I've read here, there is a tweak one can make or change to have authors in both the author column and the tag editor are listed and sorted with the last name first and the the first name last (as in Adams, Douglas instead of Douglas Adams). Whenever I tried to go to preferences, then tweak, my eyes started to glaze over and I slowly rose from my chair before running, screaming maniacally, from the room in utter confusion and frustration.
Could someone please explain how to do this in simple, step by step language a three year old (or a senile, computer challenged 61 year old) can understand? |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
There are two ways of doing that:
In the upper tweaks field, look for author_sort_copy_method (it's gonna be preceded by a bunch of lines starting with hash signs (#) explaining how to use that tweak). Copy that line to the lower field and set it to "copy" instead of "invert". Alternatively, you just type "author_sort_copy_method = 'copy'" into the lower tweaks field. Without the double quotation signs, of course. Regardless of what method you use, you need to recalculate the author_sort values if your author values are already set to "LN,FN" (Do that via right-clicking in the tags browser and selecting "Manage authors"). If the author values are not already set, you need to set those first. I'd suggest using the search & replace facility if that's the case. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,013
Karma: 251649
Join Date: Apr 2010
Location: Tempe, AZ, USA, Earth
Device: JetBook Lite (away from home) + 1 spare, 32" TV (at home)
|
You totally lost me after, "There are two ways of doing that:"
I wasn't kidding when I said I needed detailed instructions (and yes, I did go to tweaks). What may seem basic to you is Greek to me. Sorry about that. |
![]() |
![]() |
![]() |
#4 | |
Calibre Plugins Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,669
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Quote:
You found the tweaks section in Preferences so that's a good start ![]() The "Current tweaks" box at the bottom, is where you can put any values that you want to have different, i.e. overriding the default behaviour of Calibre. In your case, paste the following into the bottom box: Code:
author_sort_copy_method = 'copy' That tweak fixes the problem for any *new* authors you add. Without the tweak above, you typing in a new author of "Smith, James" would have the sort stored as "James, Smith", because the default behaviour is to "invert" the name which is *not* what you want. Instead you want Calibre to *copy* the value from author, so that both will have "Smith, James" stored in it. Having applied the tweak above you will have that problem sorted from now on. The second part of the problem (and I struggled with this too) is to realise that for all the *existing* authors in Calibre, you need to change them in a particular way to get Calibre to correctly add new books for them in the future. Calibre separately stores for each author a list recording that for a particular author name how it should be sorted. So you need the "tag viewer" pane visible on the left side of the screen, where it has a list of stuff you can expand like "Authors", "Series", "Formats" etc. Then right-click on the "Authors" at the top of that list and choose "Manage Authors". This dialog will show you all the existing authors you have, and how each will be sorted. I suggest you then work your way down the first column, changing the values where needed so they are "Last Name, First Name" which is what you are after. You might want to double check the value on the author_sort column on the right matches how you want them to be sorted too. Once you are done with that you should be sweet. Hope that helps. |
|
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,013
Karma: 251649
Join Date: Apr 2010
Location: Tempe, AZ, USA, Earth
Device: JetBook Lite (away from home) + 1 spare, 32" TV (at home)
|
Ouch. I only have 465 existing authors. There has to be an easier way.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,911
Karma: 7076137
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
![]() |
![]() |
![]() |
#7 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
The search and replace function comes to mind for her main problem. |
|
![]() |
![]() |
![]() |
#8 | |
Calibre Plugins Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,669
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Quote:
In find/replace, is it possible to take the value from the author_sort field and put it into the author field? Presumably her existing author_sort is probably pretty correct already. If she could do that it would save a lot of typing. This is one of those areas of Calibre that you kind of wish in hindsight you had been prompted to decide on what you wanted when you first create a library, as it is a complicated pain to sort out after you have imported a load of books. We haven't even mentioned the whole book sorts vs author sorts issue which was what got me confused when I first tried this until I got help here in the forums... |
|
![]() |
![]() |
![]() |
#9 | |
I devour books!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 789
Karma: 1285226
Join Date: Mar 2009
Device: iPad Air, Kindle 3/Kobo Aura HD, iPhone 6
|
Quote:
Special thanks to Lady Fitzgerald for asking the question. |
|
![]() |
![]() |
![]() |
#10 |
Member
![]() Posts: 21
Karma: 10
Join Date: Aug 2010
Device: ipad, kindle
|
In my library, the authors are sorted by 'LN, FN' but the view in Calibre is 'FN LN'. Is there a way to make the view 'FN LN'?
Edit: I mean make the view 'LN, FN' Last edited by lvovsky; 12-02-2010 at 10:14 PM. |
![]() |
![]() |
![]() |
#11 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
????
What are you trying to change? on first read of your question things are already how you want them! Last edited by itimpi; 12-02-2010 at 01:27 AM. |
![]() |
![]() |
![]() |
#12 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,911
Karma: 7076137
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
![]() Better would be to use a regexp on author to flop the names around. One would first select all books with no comma in the authors' names, then apply something like the following: Code:
Mode: regexp Source: authors Search: ^(.*) ([^ ]*)$ Replace: \2, \1 Dest: authors |
|
![]() |
![]() |
![]() |
#13 | |
Calibre Plugins Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,669
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Quote:
You provided a regex alternative which is great, at least people have some options. |
|
![]() |
![]() |
![]() |
#14 | |
Calibre Plugins Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,669
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Quote:
One last point for you and others to make this thread complete, since it sounds like you have been manually overtyping things for a while. After applying the tweak you might become a "victim" of a quirk of how Calibre stores the author sort data that I haven't gone into detail on before now. Here's the long story as I understand it. Calibre stores the author_sort values in two places. Once in a table that says for each author what it's sort should be. That makes sense, and is what you change via the "Manage authors" dialog. Think of this as the "default" sort value that will be applied when you add a new book for that author name. However Calibre also stores an author_sort value with each and every single book. Ordinarily this will be identical to that stored for the author, in fact I can't think of a situation where you would want them to be different. Ever go into the Edit Metadata dialog and see the author sort box be red? That means the sort value stored for the book differs from the sort value stored for the author. If you are sure the value stored on the book is how you want it despite the box being red, that is a sign you need to go into the "Manage Authors" dialog and change the default for that author. Why does Calibre store at book level as well at author level? That I have no idea on. The only reason I can think of as a performance optimisation - compared to the grief it causes I hope it was worthwhile ![]() So... how does it go wrong and what can you do about it? Well for me it was a combination of changing the tweak and then manually changing book authors without changing the their default in the "Manage Authors" dialog. It could also be that you added some authors in LN, FN format before the tweak (so their author_sort was inverted to be FN, LN by default). Hence I ended up with a mish-mash mess which only a trip to the forums saved my insanity from. Moral of the story. If you decide to go with this tweak don't forget to visit the Manage Authors dialog and make sure the values in there reflect what you want. If you focus on getting the "Author" column correct, you can then click the "Recalculate all author sort values" box to get it to *copy* all the author values to author sort, since you usually want them to be identical. Then when you click OK, Calibre will actually go update all of the books for each of those authors, so that the author_sort stored on each book is the same as that default value you just set for the author. From that point onwards you should rarely need to visit that dialog again. |
|
![]() |
![]() |
![]() |
#15 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,911
Karma: 7076137
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
It is mostly legacy. I added the individual author sort values sometime around the 0.7.15. Before that, the book's author sort what all that existed. Authors lists were sorted by author (not the sort), so people who used FN LN order saw the tag browser sorting differently from the library display. Legacy aside, it can be useful to have a value per book in addition to a value per author. I have had situations where I wanted a book to sort by its second author (often edited books), and I am too compulsive to reorder the authors. In other cases I have had two spellings for the same author (myself included), and wanted some of the articles to sort with one spelling and some with the other. Some people mess with author_sort to get things to work on a specific device; before plugboards the kindle required that sort of thing to deal with its idiocies involving commas in names. As a side note, I find it rather amusing that LN, FN in calibre is becoming mainstream. Last February when I added the basic tweak almost no one cared (I had one take-up on my first patch), which is why it ended up as a tweak (the very first one) instead of in the GUI. Just goes to show that no good deed goes unpunished. ![]() |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Changing from Title-Author to Author - Title | Amalthia | Calibre | 17 | 01-22-2017 11:20 PM |
Adding or changing author | denmarks | 2 | 10-05-2009 02:16 PM | |
Quick newbie question about changing author name and title | eawade | Calibre | 1 | 06-12-2009 04:37 PM |
Changing Title & Author in LRF? | fleon | Sony Reader | 8 | 01-16-2007 12:43 PM |
Changing Title & Author in .lrf files | Vienna01 | Workshop | 1 | 01-08-2007 05:45 AM |