Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 02-05-2014, 12:44 AM   #1
revjoe
Junior Member
revjoe began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jul 2011
Device: none
Escaping Name delimiters

So I have a whole library dedicated to magazines. For these magazines, I am storing the name of the magazine in the author's column. However, this creates oddness when I have a title like "Muscle & Fitness". Calibre splits that name into two authors "Muscle" and "Fitness". This works fine in 99.9% of my regular books, but doesn't work well for my magazines.

Is there anyway to escape this behavior? something to tell calibre to treat this as a whole string, rather than splitting it?

Thanks

Joe
revjoe is offline   Reply With Quote
Old 02-05-2014, 01:07 AM   #2
FizzyWater
You kids get off my lawn!
FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.
 
FizzyWater's Avatar
 
Posts: 4,220
Karma: 73492664
Join Date: Aug 2007
Location: Columbus, Ohio
Device: Oasis 2 and Libra H2O and half a dozen older models I can't let go of
I think what you want is under Preferences > Tweaks > Author sort name algorithm and > Splitting Multiple author names.
FizzyWater is offline   Reply With Quote
Advert
Old 02-05-2014, 01:11 AM   #3
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,722
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
There's this tweak

Quote:
ID: authors_split_regex

By default, calibre splits a string containing multiple author names on
ampersands and the words "and" and "with". You can customize the splitting
by changing the regular expression below. Strings are split on whatever the
specified regular expression matches, in addition to ampersands.
Default: r'(?i),?\s+(and|with)\s+'
I don't know if it can be made to ignore the '&' - maybe a regex guru will tell us

I replace the '&' with a '+' - so Muscle + Fitness, House + Garden etc

For magazines/journal etc I also put titles in author, and I put the nominal date eg 2014-02, issue number etc in title. Good to know someone else does something similar

BR

Last edited by BetterRed; 02-05-2014 at 01:19 AM.
BetterRed is offline   Reply With Quote
Old 02-05-2014, 01:01 PM   #4
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
You do run the risk of messing up the rest of your library just for this one Author
theducks is offline   Reply With Quote
Old 02-05-2014, 04:43 PM   #5
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,722
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by theducks View Post
You do run the risk of messing up the rest of your library just for this one Author
I have a dedicated physical library for my Journals and Magazines, I assumed the OP was doing the same.

I put the article authors in a separate custom column - messy but liveable with... just.


Added
I often think about putting my three main libraries into dedicated calibre portable installs.

I have to change the 'Author sort name algorithm' when I switch, which means a restart, in one library I have VL Tabs which are a waste of space in the other two etc etc. So I might as well exit and start a different portable.

Anyone know why that wouldn't work ?

The only downside I can see is three undifferentiated calibre icons in my task/launch bar (dock) - I'm sure I can fix that.


BR

Last edited by BetterRed; 02-05-2014 at 05:36 PM.
BetterRed is offline   Reply With Quote
Advert
Old 02-05-2014, 06:32 PM   #6
revjoe
Junior Member
revjoe began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jul 2011
Device: none
Yeah, I have a separate library for periodicals as well. As for it being one author, what I gave was just an example. For some stats:

Total record: 3096
Total Authors: 312
Affected Authors * : 31
Affected Books *: 441

Affected books have either "and" or "&" in the Author field, thus being split into separate authors. Compounding matters, many share words, so I have an author "Muscle" that can reflect back to several different periodicals.

So I have about 10% of my authors being affected, and about 14% of my total records. Hence the question.

I was hoping I could do something like prepend a " ' " the way excel does in order to make the column as text, or add a " \ " to the " & " character to have it avoid being split upon. I will have to go back and examine whether changing the split fields will end up doing more hard than good.



Thanks for the input everyone.
revjoe is offline   Reply With Quote
Old 02-05-2014, 07:11 PM   #7
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,722
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by revjoe View Post
Yeah, I have a separate library for periodicals as well. As for it being one author, what I gave was just an example. For some stats:

Total record: 3096
Total Authors: 312
Affected Authors * : 31
Affected Books *: 441

Affected books have either "and" or "&" in the Author field, thus being split into separate authors. Compounding matters, many share words, so I have an author "Muscle" that can reflect back to several different periodicals.

So I have about 10% of my authors being affected, and about 14% of my total records. Hence the question.

I was hoping I could do something like prepend a " ' " the way excel does in order to make the column as text, or add a " \ " to the " & " character to have it avoid being split upon. I will have to go back and examine whether changing the split fields will end up doing more hard than good.



Thanks for the input everyone.
If you 'null' the regular expression in authors_split_regex (see attachment) then that will stop it splitting on 'and' and 'with'. Then you could at least change "Muscle & Fitness" to "Muscle and Fitness" etc

But, as theducks has the reminded us, doing this sort of thing can screw up your other libraries. I think all the Tweaks are global, so you have to remember to adjust them when you switch libraries.

Maybe I should bite the bullet and put my 3 major libraries into separate calibre portable installation folders - weekend job I think

BR
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	160
Size:	112.7 KB
ID:	118757  

Last edited by BetterRed; 02-05-2014 at 07:13 PM. Reason: add attachment
BetterRed is offline   Reply With Quote
Old 02-05-2014, 07:18 PM   #8
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by BetterRed View Post
But, as theducks has the reminded us, doing this sort of thing can screw up your other libraries. I think all the Tweaks are global, so you have to remember to adjust them when you switch libraries.
Indeed, tweaks are global -- located in %calibreconfig%\tweaks.py
eschwartz is offline   Reply With Quote
Old 02-05-2014, 08:24 PM   #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: 21,722
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by eschwartz View Post
Indeed, tweaks are global -- located in %calibreconfig%\tweaks.py
Indeed, but which %calibreconfig% would that be I now have more than one !!

I just copied the the three small test libraries I have for each of my major libraries (JournalsTest, MainTest, MediaTest) into there own instances of calibre portable along with a copy of the 'global' calibre config folder.

Seems OK, I can now apply that author name split tweak to my journals library and leave the others at the default etc etc,

I solved the undifferentiated calibre icons in my task bar 'problem' with pStart

BR
BetterRed is offline   Reply With Quote
Old 02-05-2014, 08:29 PM   #10
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by BetterRed View Post
Indeed, but which %calibreconfig% would that be I now have more than one !!

I just copied the the three small test libraries I have for each of my major libraries (JournalsTest, MainTest, MediaTest) into there own instances of calibre portable along with a copy of the 'global' calibre config folder.

Seems OK, I can now apply that author name split tweak to my journals library and leave the others at the default etc etc,

I solved the undifferentiated calibre icons in my task bar 'problem' with pStart

BR
You could also use the environment variable CALIBRE_CONFIG_DIRECTORY in bat scripts.
eschwartz is offline   Reply With Quote
Old 02-05-2014, 10:31 PM   #11
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,722
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by eschwartz View Post
You could also use the environment variable CALIBRE_CONFIG_DIRECTORY in bat scripts.
There are reasons why that won't work for me today, tried and thought about it for about 12 months.

Maybe once I've established a configuration that works with library specific portables, and rejigged and poked some non calibre things, I'll be in a position to switch to a script based solution and dispense with the portables.

Calibre is just the left front paw

BR
BetterRed is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
escaping spaces in command line --title nimblebooks Conversion 4 11-23-2011 01:31 PM
Search and Replace Tag/Author Delimiters darkbeanies Library Management 13 08-22-2011 12:35 AM
Dictionary question: changing word delimiters for french dictionary oecherprinte Amazon Kindle 1 05-09-2011 04:45 AM
ESCAPING CELIA, A Jersey Shore Novel TC Beacham Self-Promotions by Authors and Publishers 4 09-09-2010 01:02 PM
I'm escaping! I'm escaping! ShortNCuddlyAm Lounge 54 03-16-2009 06:45 PM


All times are GMT -4. The time now is 10:53 AM.


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