Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-02-2010, 04:56 PM   #1
Mriswith2k
Junior Member
Mriswith2k began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Oct 2010
Device: Kindle 3
Help tweaking as to only use the first author in the author_sort tweak

After changing (and then changing back) my sorting method in the tweaks from library->alphabetical and the author_sort_copy_method from invert to copy.
I can't actually remember if I had this problem before or if I unintentionally broke it when I did .
The problem I'm having however is that when I'm sorting my series (after inverting all the changed I did to default settings), My list looks like the following when using Authors/Series sort

Code:
Author1 - B Series
Author1 - Q Series
Author1 & Author 2 - A Series
this is not really a problem for me as long as an entire series has multiple but the same authors.

The problems is when there is a single series containing multiple authors ex.
Code:
Author1 - A Series (01) - title
Author1 - A Series (03) - title
Author1 - A Series (05) - title
Author1 - Q Series
Author1 & Author2 - A Series (02) - title
Author1 & Author3 - A Series (04) - title
My question / wish is that there was a way to use the tweak:
'author_sort_copy_method' to only copy the first author from 'author' to author_sort, whatever how many authors it actually contains. (using the & as a breaker).

Last edited by Mriswith2k; 12-02-2010 at 05:10 PM.
Mriswith2k is offline   Reply With Quote
Old 12-02-2010, 10:29 PM   #2
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: 12,365
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Sorry, but I don't understand what you want to do. What list are you referring to in your examples? The examples look like something produced by a save template or a composite column. Are they? Are you trying to get only one author from author_sort when saving to disk/sending to device?
chaley is offline   Reply With Quote
Advert
Old 12-03-2010, 02:59 AM   #3
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,895
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by Mriswith2k View Post
The problems is when there is a single series containing multiple authors ex.
Code:
Author1 - A Series (01) - title
Author1 - A Series (03) - title
Author1 - A Series (05) - title
Author1 - Q Series
Author1 & Author2 - A Series (02) - title
Author1 & Author3 - A Series (04) - title
My question / wish is that there was a way to use the tweak:
'author_sort_copy_method' to only copy the first author from 'author' to author_sort, whatever how many authors it actually contains. (using the & as a breaker).
No there is no current tweak just to copy the first author to author sort. Go to the tag browser and right click on authors and select manage authors and fix the author sort manually.

There are some series that have so many authors I just enter various under author sort to keep the series together.
DoctorOhh is offline   Reply With Quote
Old 12-03-2010, 03:26 AM   #4
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: 12,365
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
If what you want to do is really change author_sort to contain only one author, then you can do that with search replace. Select all your books, then go to search replace (hit 'E').

Code:
Search mode: regular expression
source: author_sort
search:^(.*?)&.*$
replace:\1
dest: author_sort (or empty)
This will remove the second and subsequent authors from author_sort.

You should test this on a couple of books before whacking your library with it.
chaley is offline   Reply With Quote
Old 12-03-2010, 05:50 AM   #5
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,895
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by chaley View Post
If what you want to do is really change author_sort to contain only one author, then you can do that with search replace. Select all your books, then go to search replace (hit 'E').

Code:
Search mode: regular expression
source: author_sort
search:^(.*?)&.*$
replace:\1
dest: author_sort (or empty)
This will remove the second and subsequent authors from author_sort.

You should test this on a couple of books before whacking your library with it.
Another example of calibre's flexibility.
DoctorOhh is offline   Reply With Quote
Advert
Old 12-03-2010, 01:21 PM   #6
Mriswith2k
Junior Member
Mriswith2k began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Oct 2010
Device: Kindle 3
Great job thanks a lot, it would still be nice to have this as a tweak sometime in the future, but this will make life much easier in the meanwhile
(also I only used the names in the first post as a sorting example, my actual issue was with the John Ringo - Aldenata series)

It needs to be
Code:
^(.*?) & .*$
though, else the first author will have 2 spaces afterwards for each other author removed.

Result:

Last edited by Mriswith2k; 12-03-2010 at 01:46 PM.
Mriswith2k is offline   Reply With Quote
Old 12-03-2010, 02:18 PM   #7
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: 12,365
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Mriswith2k View Post
It needs to be
Code:
^(.*?) & .*$
though, else the first author will have 2 spaces afterwards for each other author removed.
Leading and trailing spaces are supposed to be removed by S/R. If they are not, then please file a ticket.

And FWIW: my original regexp would have left one space at the end. All the authors are removed at one go by the .*$, not author by author.
chaley is offline   Reply With Quote
Old 12-03-2010, 03:16 PM   #8
Mriswith2k
Junior Member
Mriswith2k began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Oct 2010
Device: Kindle 3
Ah yes your completely correct, I must have added the extra space after the \1 by mistake that time.
So
Code:
^(.*?) &.*$
works perfectly. (the extra space has to go as it does mess up the sorting order sadly)
Mriswith2k is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Do books bought from Sony and B&N need tweaking before they can be viewed on the Kobo stodge Kobo Reader 2 11-06-2010 10:29 PM
Table of contents - tweaking webfolk Calibre 26 11-05-2010 05:21 PM
Sorting Tweak atjnjk Calibre 6 08-31-2010 06:36 AM
Tweak to User Manual edbro Calibre 1 07-24-2010 11:26 AM
Questions about tweaking The Lost Symbol ficbot Workshop 3 09-24-2009 09:08 PM


All times are GMT -4. The time now is 07:44 AM.


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