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 02-10-2014, 01:56 PM   #1
PatNY
Zennist
PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.
 
PatNY's Avatar
 
Posts: 1,022
Karma: 47809468
Join Date: Jul 2010
Device: iPod Touch, Sony PRS-350, Nook HD+ & HD
Removing "and" from author split

The default is to split authors on the word "and" which is causing havoc with the authors in my Calibre db. I saw the tweak to fix this, but it is a regex expression and I'm not exactly sure how to tweak it.

Here is the default:

authors_split_regex = '(?i),?\\s+(and|with)\\s+'

Do I simply remove the word "and" so it looks like this? ...

authors_split_regex = '(?i),?\\s+(|with)\\s+'

I know regex can be finicky and I don't want to break any other part of the expression by simply deleting the word.

--Pat
PatNY is offline   Reply With Quote
Old 02-10-2014, 03:14 PM   #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: 31,047
Karma: 60358908
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 PatNY View Post
The default is to split authors on the word "and" which is causing havoc with the authors in my Calibre db. I saw the tweak to fix this, but it is a regex expression and I'm not exactly sure how to tweak it.

Here is the default:

authors_split_regex = '(?i),?\\s+(and|with)\\s+'

Do I simply remove the word "and" so it looks like this? ...

authors_split_regex = '(?i),?\\s+(|with)\\s+'

I know regex can be finicky and I don't want to break any other part of the expression by simply deleting the word.

--Pat
also remove the 'or' |
theducks is offline   Reply With Quote
Advert
Old 02-10-2014, 04:25 PM   #3
PatNY
Zennist
PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.
 
PatNY's Avatar
 
Posts: 1,022
Karma: 47809468
Join Date: Jul 2010
Device: iPod Touch, Sony PRS-350, Nook HD+ & HD
Thanks, duck. That works

But now I have another issue related to this author split.

Background: I added a cookbook whose author is "Better Homes and Gardens." Before I made the tweak, Calibre would automatically split the author into 2: "Better Homes" and "Gardens." Additionally, an ampersand would automatically replace the "and."

Now, after the tweak, there is one author and Calibre retains the "and" in the author's name, which is correct. However, in the tag browser, the author is listed as "Gardens, Better Homes and" under the G's.

How do I get it to only show as "Better Homes and Gardens" under the B's?

For the metadata on this book, I have "Better Homes and Gardens" in both the Author and Author Sort fields.

--Pat

Last edited by PatNY; 02-10-2014 at 04:46 PM.
PatNY is offline   Reply With Quote
Old 02-10-2014, 04:49 PM   #4
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,737
Karma: 26785684
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Samsung Galaxy Tab S8 Ultra
Manually update the author_sort field to what you think it should be. Done!
Adoby is offline   Reply With Quote
Old 02-10-2014, 04:57 PM   #5
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: 31,047
Karma: 60358908
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 PatNY View Post
Thanks, duck. That works

But now I have another issue related to this author split.

Background: I added a cookbook whose author is "Better Homes and Gardens." Before I made the tweak, Calibre would automatically split the author into 2: "Better Homes" and "Gardens." Additionally, an ampersand would automatically replace the "and."

Now, after the tweak, there is one author and Calibre retains the "and" in the author's name, which is correct. However, in the tag browser, the author is listed as "Gardens, Better Homes and" under the G's.

How do I get it to only show as "Better Homes and Gardens" under the B's?

For the metadata on this book, I have "Better Homes and Gardens" in both the Author and Author Sort fields.

--Pat
Instead of messing up normal parsing of authors, try using a NBSP between the and
Code:
Better Homes*and*Gardens

There is always 1
Just to make our lives
A is for Apple is not is for Apple, A
theducks is offline   Reply With Quote
Advert
Old 02-10-2014, 05:01 PM   #6
PatNY
Zennist
PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.
 
PatNY's Avatar
 
Posts: 1,022
Karma: 47809468
Join Date: Jul 2010
Device: iPod Touch, Sony PRS-350, Nook HD+ & HD
Quote:
Originally Posted by Adoby View Post
Manually update the author_sort field to what you think it should be. Done!
I already did in the metadata editor. The problem is that in the tag browser where it has the authors, the author is not listed correctly as "Better Homes and Gardens" under the B's. Instead it shows up as "Gardens, Better Homes and" under the G's.

There must be some other tweak I'm missing.

--Pat
PatNY is offline   Reply With Quote
Old 02-10-2014, 05:11 PM   #7
PatNY
Zennist
PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.
 
PatNY's Avatar
 
Posts: 1,022
Karma: 47809468
Join Date: Jul 2010
Device: iPod Touch, Sony PRS-350, Nook HD+ & HD
Quote:
Originally Posted by theducks View Post
Instead of messing up normal parsing of authors, try using a NBSP between the and
Code:
Better Homes*and*Gardens
Huh?

Which field?

--Pat
PatNY is offline   Reply With Quote
Old 02-10-2014, 05:20 PM   #8
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: 31,047
Karma: 60358908
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 PatNY View Post
Huh?

Which field?

--Pat
In the Main (Authors), the the calculated sort might ignore the space when parsing the sort.

But you can always hand correct the 'Master' Sort
In the Tag Browser (Authors): Right click: Manage Authors: <select>

Fixing it (the sort column) there, affects ALL books with that name

Last edited by theducks; 02-10-2014 at 05:21 PM. Reason: clarify
theducks is offline   Reply With Quote
Old 02-10-2014, 05:27 PM   #9
PatNY
Zennist
PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.
 
PatNY's Avatar
 
Posts: 1,022
Karma: 47809468
Join Date: Jul 2010
Device: iPod Touch, Sony PRS-350, Nook HD+ & HD
Quote:
Originally Posted by theducks View Post
In the Main (Authors), the the calculated sort might ignore the space when parsing the sort.

But you can always hand correct the 'Master' Sort
In the Tag Browser (Authors): Right click: Manage Authors: <select>

Fixing it (the sort column) there, affects ALL books with that name

Oh great. That did the trick! I didn't know you could edit the authors over in the tag browser. I didn't need to put in nbsp, either -- just "Better Homes and Gardens" and it shows up properly now.

Thanks, ducks!

--Pat
PatNY is offline   Reply With Quote
Old 02-10-2014, 06:11 PM   #10
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: 21,721
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by PatNY View Post
Oh great. That did the trick! I didn't know you could edit the authors over in the tag browser. I didn't need to put in nbsp, either -- just "Better Homes and Gardens" and it shows up properly now.

Thanks, ducks!

--Pat
I think you can also override the author_sort in Manage Authors. Right click author name in Book details and select Manage Authors; or go the long way via the Alter Tag Browser button at the bottom of the Tag browser.

BR
BetterRed is online now   Reply With Quote
Old 02-10-2014, 06:40 PM   #11
PatNY
Zennist
PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.
 
PatNY's Avatar
 
Posts: 1,022
Karma: 47809468
Join Date: Jul 2010
Device: iPod Touch, Sony PRS-350, Nook HD+ & HD
Quote:
Originally Posted by BetterRed View Post
I think you can also override the author_sort in Manage Authors. Right click author name in Book details and select Manage Authors; or go the long way via the Alter Tag Browser button at the bottom of the Tag browser.

BR
Thanks. That's the exact field I edited. The Author field was fine. It was just the sort field that was off, despite what I had specified in the metadata editor.

--Pat
PatNY is offline   Reply With Quote
Old 02-10-2014, 08:21 PM   #12
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: 21,721
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by PatNY View Post
Thanks. That's the exact field I edited. The Author field was fine. It was just the sort field that was off, despite what I had specified in the metadata editor.

--Pat
My experience is that you can't override the author sort rules in the Metadata Edit dialogue, you can only do it in the Tag Browser (as described by theducks) or in the Manage Authors list - maybe its depends on the values in the tweaks.

I don't use Metadata Edit, I edit the metadata in the book list cells, and I don't show the Tag Browser - that's why I use the right click on author name in Book Details pane (the one with the cover to left of, or under, the book list)

BR
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	172
Size:	60.1 KB
ID:	118946  
BetterRed is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A warning for Linux users: slow "Add Books", "Unknown" title and Author rolgiati Library Management 8 07-24-2013 04:36 PM
Regex or other method to find split quotations "" CyanBC Sigil 9 05-14-2013 02:52 PM
Split long words using the "¬" character (small screens) DSpider Workshop 5 03-16-2012 07:09 AM
George R. R. Martin's "A Dance With Dragons" to be split into separate books. Exer General Discussions 4 04-02-2011 08:50 AM
Any way to revert the "Do No Split On Page Breaks" option? dsana123 Calibre 2 07-10-2010 02:37 PM


All times are GMT -4. The time now is 12:39 AM.


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