I have been reading this forum for a while to try and understand how to set my list of a few thousand books in some sort of first or last name order, but it seems with authors having a first name and a last name, series number,and tag data, calibre places them in no particular order.
my first book in "alphabetical" order is e02 alan bennett,then e03 alan bennett,then Mcewan ian then ryan north 5th book is woods stuart ???
i have tried tweaks,"none" "invert" author 0 title 0 series 0 i have clicked on every possible button such as manage authors sort, sort author .
That kovid Goyal obviously knows is stuff to design calibre its a pity that for people like me (silver surfer) who desires simplicity i either have a forum full of ideas but not a simple settup guide.
thanks

Last edited by Manichean; 03-16-2011 at 07:48 PM.
Reason: Edited title to something meaningful

I'm most likely not understanding your question. It sounds like you just want to sort by author name. If so, and if the names are all you have in the author field, then just clicking on "Authors" in the column header works fine for that.

I have been reading this forum for a while to try and understand how to set my list of a few thousand books in some sort of first or last name order, but it seems with authors having a first name and a last name, series number,and tag data, calibre places them in no particular order.

This sounds like it is the root of your problem: Calibre isn't designed to manage author names, series numbers and tags all in the authors metadata field. You should split that data up into the respective fields it belongs in. The authors field sorts on an extra column called author_sort, which is probably somewhat messed up because of the rather random content of your authors metadata field as you described below.

Quote:

my first book in "alphabetical" order is e02 alan bennett,then e03 alan bennett,then Mcewan ian then ryan north 5th book is woods stuart ???
i have tried tweaks,"none" "invert" author 0 title 0 series 0 i have clicked on every possible button such as manage authors sort, sort author .

The relevant tweak here is "Author sort name algorithm", what is that currently set to? Your authors field should contain the authors name (and only the authors name) either as "Firstname Lastname" or "Lastname, Firstname"- Pick one, then set the tweak accordingly (you'll probably want to sort on author last name, so if your authors field has "Firstname Lastname", set it to "invert", if your authors field has "Lastname, Firstname", set it to "copy"). If you've set that up and edited the metadata as above, you should be able to get author sorting by last name.

Q. The relevant tweak here is "Author sort name algorithm", what is that currently set to?
A. if i go into tweaks and click on "Author sort name algorithm" it shows author_sort_copy_method = 'invert'
Q. Your authors field should contain the authors name
A. is authors field in tweaks ? or in the left hand pane in authors ? or do you mean the authors field column in the library list ?

Q. This sounds like it is the root of your problem: Calibre isn't designed to manage author names, series numbers and tags all in the authors metadata field. You should split that data up into the respective fields it belongs in. The authors field sorts on an extra column called author_sort, which is probably somewhat messed up because of the rather random content of your authors metadata field as you described below.
A. ok so the metadata could place my authors by first name first or first name last and also with a series number, which seems to have occurred but how do i split up the data "into respective fields it belongs in"

I am sorry but bill gates can rest content that i will not overtake him with my computer prowess but this appears awfully long winded for what i want, calibre does a fine job of compiling ebooks,reformatting them,finding covers etc, and adding them to your reader. BUT since i have the ebooks in a list i am sure something like excel could organise them in one click ?
thank you very much.

I am sorry but bill gates can rest content that i will not overtake him with my computer prowess but this appears awfully long winded for what i want, calibre does a fine job of compiling ebooks,reformatting them,finding covers etc, and adding them to your reader. BUT since i have the ebooks in a list i am sure something like excel could organise them in one click ?
thank you very much.

I am afraid even Excel could not help you here . The problem is that the field that you are sorting on (author_sort) when you click the authors column header contains incorrect data, and that is what the sort is occurring on.

The tweaks help with this as they define the relationship between what is shown in the display (author) and the underlying sort (author_sort) fields.

This means Calibre will get its naming info from your file names rather than the file metadata (which might be a mess or, at least, not what you want).

Then you need to choose a regular expression to match your file naming structure - Calibre has several built-in, which will likely do for your needs.
Just below where you enter a regular expression is a built-in test area for these.
You can make up any names you like - just remember to include an extension for your test name or it won't work.

IDEA 2:
Once you have your books in good order, you might want to run a few tests before adding them to your Calibre library.
An easy way to do this is to a use text editor (Windows comes with Notepad) and create a few test files.
You can right-click in an clear area of a open window or your desktop and choose:

"New -> Text Document..."

Create a few and give them names matching several of your books - pick book titles that are currently giving you difficulty.
Add those to Calibre and try out a few settings to see what works best.
This way, you are only affecting dummy files and you can have as many "do-overs" as you like.

As you can see, I'm still new to this program and feeling my way.
I've found this a quick 'n dirty way to get a feel for some of the functions that make my head hurt.

IDEA 3:
I noticed that some of your authors are in "first_name last_name" format, some are "last_name, first_name".
In Calibre settings there is a tweak that can help:

Preferences -> Tweaks ->Author sort name algorithm

The default is "invert" - change this to "comma"
This enables Calibre to tell the difference between the two and add the author details correctly to the library.

Good luck with this and I hope my suggestions help.
Hopefully, one of the more experienced members will look this over and correct any erroneous advice on my part.

Q. The relevant tweak here is "Author sort name algorithm", what is that currently set to?
A. if i go into tweaks and click on "Author sort name algorithm" it shows author_sort_copy_method = 'invert'

Depending on what you want your authors field to look like, this can be the right or wrong setting. If you want your authors to be listed as "Firstname Lastname" and sort by last name, you won't have to change anything. If you want your authors to be listed as "Lastname, Firstname" and sort by last name, though, you should set the tweak to "copy", restart Calibre and then start editing your book information (= metadata) to your liking.

Quote:

Q. Your authors field should contain the authors name
A. is authors field in tweaks ? or in the left hand pane in authors ? or do you mean the authors field column in the library list ?

No, the authors and author_sort fields are the metadata fields containing the author info. In the normal library view, half of the info is presented in the authors column, the author_sort field is normally invisible. Try selecting one of your book entries and hit the E button (or select "edit metadata" from the toolbar), and another window should open up that allows you to edit your metadata in both the author and author_sort columns, amongst others. After you've set the authors field to either "Firstname Lastname" or "Lastname, Firstname", depending on what you like (and set the tweak accordingly, see above), remember to set the author_sort field for that book. There's a button that lets Calibre do that automatically for the book you're currently editing- it's the one between the authors and author_sort fields on the righthand side. If all went well, you should have "Lastname, Firstname" in the author_sort field for Calibre to sort on author last name.

Quote:

Q. This sounds like it is the root of your problem: Calibre isn't designed to manage author names, series numbers and tags all in the authors metadata field. You should split that data up into the respective fields it belongs in. The authors field sorts on an extra column called author_sort, which is probably somewhat messed up because of the rather random content of your authors metadata field as you described below.
A. ok so the metadata could place my authors by first name first or first name last and also with a series number, which seems to have occurred but how do i split up the data "into respective fields it belongs in"

Open up the edit metadata dialog window like I described above. That should allow you access to all metadata fields. Then copy the series information into the series metadata field etc.

Last edited by Manichean; 04-01-2011 at 04:40 AM.
Reason: fixed small error

Had another go at sorting library list, set tweak to copy and r/clicked authors in tag browser and clicked on one of the buttons and miraculously their all in order (but for a few which i changed manually) but by first name first which is good enough for me.
It appeared that when i was trying to set them by last name order it was totally confusing list.
thank you all for help.