Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 06-13-2011, 04:20 AM   #1
curiosity
Enthusiast
curiosity doesn't littercuriosity doesn't litter
 
Posts: 34
Karma: 179
Join Date: May 2011
Device: prs600
Search & Replace question - something not right

Hi,
Question please,

I select 3 books by william shakspeare - I hit e for edit - select authors in the drop down - put in what Im looking for and what I want to replace the text with sometimes it works others not, more often not.

eg I search for

Shakespeare William 1564-1616

and want to replace it with

William Shakespeare

I hit apply - ok - etc the text is not changed..

I apply a test the test shows up ok but still no change to author???

I must be doing something not quite right so a guiding hand would be appreciated.

Mind you its not a huge prob only 3 books to rename which only takes seconds to do manually BUT I'm curious after an hour or so of screwing around with it..

Actually is it possible to do a *.* in authors and replace with whatever I want?

What am I missing ?

Cheers and thanks in advance for all and any assistance..

Last edited by curiosity; 06-13-2011 at 04:56 AM.
curiosity is offline   Reply With Quote
Old 06-13-2011, 06:30 AM   #2
Manichean
Wizard
Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!
 
Manichean's Avatar
 
Posts: 3,130
Karma: 80520
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Are you using regular expression search mode or normal search mode? If you are using regular expression mode, what is your destination field set to? In both of the search modes, did you check to make sure you're searching on author field?
Manichean is offline   Reply With Quote
 
Advertisement
Old 06-13-2011, 07:09 AM   #3
curiosity
Enthusiast
curiosity doesn't littercuriosity doesn't litter
 
Posts: 34
Karma: 179
Join Date: May 2011
Device: prs600
Quote:
Originally Posted by Manichean View Post
Are you using regular expression search mode or normal search mode? If you are using regular expression mode, what is your destination field set to? In both of the search modes, did you check to make sure you're searching on author field?
Thank you for replying,

I'm just doing a normal search not using expressions - I dont know how to use those..

Im selecting Author in the drop down box..

Im assuming obviously incorrectly that the search and replace is similar or the same as in ms word or excel but seems not to be.

Ive discovered that if there are two authors credited with a book and have a separator I cant just blanket change or delete those either ..

eg
author = john smith & will smith..

is it possible to do a search author *.* so whatever is in author is deleted and replaced by the text that I want to replace it with ?

Again thank you for the courtesy of a reply.

Cheers
curiosity is offline   Reply With Quote
Old 06-13-2011, 07:32 AM   #4
chaley
"chaley", not "charley"
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: 5,814
Karma: 1216136
Join Date: Jan 2010
Location: France
Device: Many android devices
Calibre does not support the 'wildcard' mode that MS uses in some places. If you want to get that functionality, you must use regular expression mode. No way around that. Note that the regex for 'anything' is ".*" (without the quotes). "*.*" is an illegal regular expression.

Search and replace (S/R) specially handles fields that contain multiple values, such as the authors and tags fields. Each author/tag is processed individually, not as a single value containing all the authors/tags.

S/R can treat multiple-valued fields as single values, but it is another step up in complexity beyond regular expressions. You must use 'template' as the source field, provide a template (in calibre's template language) that generates the value you want to work with, provide appropriate search & replace values, then set the destination field to where you want the information to go. For example, to change all authors of a book to the value "Someone Else", you would (all without the quotes):
- set the source field to template
- set the template to "{authors}"
- set the search string to ".*"
- set the replace string to "Someone Else"
- set the destination field to Authors.
chaley is offline   Reply With Quote
Old 06-13-2011, 08:15 AM   #5
curiosity
Enthusiast
curiosity doesn't littercuriosity doesn't litter
 
Posts: 34
Karma: 179
Join Date: May 2011
Device: prs600
Quote:
Originally Posted by chaley View Post
Calibre does not support the 'wildcard' mode that MS uses in some places. If you want to get that functionality, you must use regular expression mode. No way around that. Note that the regex for 'anything' is ".*" (without the quotes). "*.*" is an illegal regular expression.

Search and replace (S/R) specially handles fields that contain multiple values, such as the authors and tags fields. Each author/tag is processed individually, not as a single value containing all the authors/tags.

S/R can treat multiple-valued fields as single values, but it is another step up in complexity beyond regular expressions. You must use 'template' as the source field, provide a template (in calibre's template language) that generates the value you want to work with, provide appropriate search & replace values, then set the destination field to where you want the information to go. For example, to change all authors of a book to the value "Someone Else", you would (all without the quotes):
- set the source field to template
- set the template to "{authors}"
- set the search string to ".*"
- set the replace string to "Someone Else"
- set the destination field to Authors.
Oh hey thank you for the courtesy of your reply - thank you very much for the explanation of how it works and the examples awesome.!!!!

Ill add that to my little list of useful information for calibre... what an awesome reasonably simple to use but complex cataloguing program..

cheers
curiosity is offline   Reply With Quote
Old 06-13-2011, 10:00 AM   #6
curiosity
Enthusiast
curiosity doesn't littercuriosity doesn't litter
 
Posts: 34
Karma: 179
Join Date: May 2011
Device: prs600
Hey just a quick thank you again.

Those examples you gave me opened up a nice pandora's box of other experiments I can try.

I'm almost dangerous

Cheers....
curiosity is offline   Reply With Quote
Old 06-14-2011, 11:12 AM   #7
transmitthis
Addict
transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.
 
transmitthis's Avatar
 
Posts: 285
Karma: 1003542
Join Date: May 2011
Device: Google Nexus 7 16GB
The simple way to achieve what you wanted would be to,
Click on Authors on the left panel find the one you want to change and right click it for the rename option.

I find I'm doing that a lot when some Authors are put under George RR Martin/ George R. R. Martin for example.
transmitthis is offline   Reply With Quote
Old 06-14-2011, 11:39 PM   #8
curiosity
Enthusiast
curiosity doesn't littercuriosity doesn't litter
 
Posts: 34
Karma: 179
Join Date: May 2011
Device: prs600
Quote:
Originally Posted by transmitthis View Post
The simple way to achieve what you wanted would be to,
Click on Authors on the left panel find the one you want to change and right click it for the rename option.

I find I'm doing that a lot when some Authors are put under George RR Martin/ George R. R. Martin for example.
I don't have that many books that it really worried me - having said that insatiable curiosity leads me to asking the questions is there a different or more efficient way of doing it.

Chaley's example though did open my eyes to discovering other functions and possibilities of how to go about things within Calibre - I love his signature "Feels like I am providing fish instead of teaching how to fish..." lol in this case he gave me the fish but he also opened up another avenue which I've managed to now explore and build on.. so he has taught me how to fish indirectly.

The thing that really doesn't surprise me is the way the authors are names eg

j b smith you will find as John B smith or John Baldy Smith or as j b smith - which of course leaves you with three directory's and a split of "one" author.

This also becomes annoying when you have in the authors name contributors the j b smith & bill blogs (who may just be the artist) causing another split.

Not to mention the j b smith & bill blogs as a co writer or whatever the person may be particularly when it comes to series or where the primary writer is placed as the secondary bill blogs & j b smith causing more directory's and splits.

Speaking of which how does one search for "&" its obviously a control character I haven't nutted out how to find it by searching..

So I guess with no A.I support its no wonder Calibre is so complex with so many features.

I'm just pedantic about having things in certain folders authors of series regardless of co writers and other contributors to be found in "one" directory.

I also tend to name my books as eg Greg Bear not Bear Greg - I know that might not be convention but I don't think of Bear Greg when talking about his books I use his first name.

It is custom in some European countries to address or introduce oneself by surname first - its a habit I don't have.

Any ways I love Calibre what an awesome product the more I fiddle with it the more it grows on me..

I must say I've seen many programmers take product of much much less quality than this and make a commercial product, my hat goes off the the owners and writers of this program keeping it "free".

Avagoodone all and thanks for the assistance I've received so far.

Cheers
curiosity is offline   Reply With Quote
Old 06-15-2011, 12:36 AM   #9
transmitthis
Addict
transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.
 
transmitthis's Avatar
 
Posts: 285
Karma: 1003542
Join Date: May 2011
Device: Google Nexus 7 16GB
I think you may be getting a bit hung up on "directory's" and "folders"
Normally in Windows explorer I would applaud that, and indeed I can find anything in my System without using search, as its all organised exactly the way I want it.

However, Calibre does it's own organisation, its best you don't even look at the folders or directory's it creates, it doesn't really matter how it is storing your books, as long as you tag them and keep the meta data current.

"j b smith you will find as John B smith or John Baldy Smith or as j b smith"
For those I just find them in the list of authors, and rename them to J. B. Smith (Or John Baldy Smith) which ever takes your fancy. Then they are all organised correctly and only one entry exists for that author.

Indeed FN then LN is much better, that's the way I organize my Author names.

&&&& Secondary Authors, to me that just makes it easy to search for an Author, ie if its a book by A & B, then both of then will have an entry in the Author list, and if you only remember one of them you can still easily find the book you wanted.

Not sure if you asked any particular questions there, but hope above may of been of some help.
Oh, you may want to export as excel, and have a look through it that way, easy to do some searches that way, should you need to.
transmitthis is offline   Reply With Quote
Old 06-15-2011, 12:53 AM   #10
curiosity
Enthusiast
curiosity doesn't littercuriosity doesn't litter
 
Posts: 34
Karma: 179
Join Date: May 2011
Device: prs600
Oh hey,

Sry I apologise re directory's in Calibre - that I know and not grizzling regarding that - Calibre has its own sorting method which works the way it works.

What I was referring to was when I do a save to disk - I should have been more clear, I just dislike the other factors influencing the way the directory is going to be named, so there quite a bit of work to do to get it the way I want it.

Its just that so many years of doing things in a particular way becomes a habit.

I'm glad that someone else prefers FN to LN which is better for me.

No question there at all that I was asking just general banter I hope the moderators don't mind..

One question I did have though was how to you search for & in Calibre it being a control character or separator..

Regards..
curiosity is offline   Reply With Quote
Old 06-15-2011, 02:16 AM   #11
theducks
Grand Sorcerer
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: 15,098
Karma: 5939999
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by curiosity View Post
Oh hey,

Sry I apologise re directory's in Calibre - that I know and not grizzling regarding that - Calibre has its own sorting method which works the way it works.

What I was referring to was when I do a save to disk - I should have been more clear, I just dislike the other factors influencing the way the directory is going to be named, so there quite a bit of work to do to get it the way I want it.

Its just that so many years of doing things in a particular way becomes a habit.

I'm glad that someone else prefers FN to LN which is better for me.

No question there at all that I was asking just general banter I hope the moderators don't mind..

One question I did have though was how to you search for & in Calibre it being a control character or separator..

Regards..
When you see a '&', the authors are split behind the scenes (there is no single Smith&Jones, but an entry Smith and a entry Jones linked to the same title.
If you use the Tag Browser to construct a search: at the bottom: 'Match All", then select the authors (red Plus)

Results example:
Code:
authors:"=David Drake" and authors:"=Eric Flint"
theducks is offline   Reply With Quote
Old 06-15-2011, 03:02 AM   #12
transmitthis
Addict
transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.
 
transmitthis's Avatar
 
Posts: 285
Karma: 1003542
Join Date: May 2011
Device: Google Nexus 7 16GB
Not done a save to disk, so don't know how it saves things, I imagine it can be a pain if its not very customizable in that area. (I just back up the library in its entirety, so have no need of the save to disk function...yet)

Not sure why you would need to search for the "&" Like theducks said above, and I tried to previously, the Authors get split, into separate Authors. Are you trying to find books that have more than one Author for some reason?

I hope their is no issue re: general banter or I will soon be in trouble. lol
transmitthis is offline   Reply With Quote
Old 06-15-2011, 03:07 AM   #13
Manichean
Wizard
Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!
 
Manichean's Avatar
 
Posts: 3,130
Karma: 80520
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by curiosity View Post
Chaley's example though did open my eyes to discovering other functions and possibilities of how to go about things within Calibre - I love his signature "Feels like I am providing fish instead of teaching how to fish..." lol in this case he gave me the fish but he also opened up another avenue which I've managed to now explore and build on.. so he has taught me how to fish indirectly.
It's a sentiment most of the regulars probably share some time or another. I know I feel like that sometimes
(This is not about you, wanting to learn after seeing examples is a Good Thing, but many people expect to just get delivered solutions...)
Manichean is offline   Reply With Quote
Old 06-15-2011, 04:06 AM   #14
curiosity
Enthusiast
curiosity doesn't littercuriosity doesn't litter
 
Posts: 34
Karma: 179
Join Date: May 2011
Device: prs600
Quote:
Originally Posted by transmitthis View Post
Not done a save to disk, so don't know how it saves things, I imagine it can be a pain if its not very customizable in that area. (I just back up the library in its entirety, so have no need of the save to disk function...yet)

Not sure why you would need to search for the "&" Like theducks said above, and I tried to previously, the Authors get split, into separate Authors. Are you trying to find books that have more than one Author for some reason?

I hope their is no issue re: general banter or I will soon be in trouble. lol
I like to save to disk just because I'm a creature of habit.. If you try to save one of your books to disk you'll see what I mean - you need to tell Calibre how you want your naming of files to be.. I use this....

{authors}/{authors} - {series} {series_index:0>2s} - {title} - {isbn}

so when I save a book that's catalogued it appears in eg

folder = John Smith
file = John Smith - book 01 - I's a book - 1234567890.epub

You have various permutations of that so it saves as FN LN with series without etc etc..

I save to disk only because of just in case disaster and for whatever reason you loose formatting or whatever in Calibre, and like I said Im a creature of habit I just like to see the files named in a meaning full way for me.

For importing books I use a solution I found in these forums

^(?P<author>[^-]+)(\s*-\s*(\[?(?P<series>[^-0-9]+)\s*(?P<series_index>[0-9.]+)?]?)?)?.*?-\s*(?P<title>[^\]{[()]+\w)\s*-s*(?P<isbn>.+)

Which of course you can customise to suit how calibre reads your files before adding them if you have any books without metadata in them, as you can have Calibre import by using the file name or looking in the metadata.

Personally I like seeing the isbn number in the file name which generally reduces any ambiguity when searching for a book, having said that there are multiple isbn numbers for the same author and book depending on when and who released it (I'm assuming that any ways).

As far as the & I've only just realised that Calibre adds that as a separator for multiple authors or people credited to one book (I know I'm slow at picking up things at times :P)..

The reason I wanted to search for the & was to find the multiple authors and deleted the secondary author just to be able to keep my series under the primary author in one directory.... I'm sure there will be some laughing at this as theres probably a solution for it but till I fall over it and have someone correct me in my procedure thats the way I do it..

Again being a creature of habit I really hate having multiple authors because it doesnt sit well when saving to disc looking for a series in different places.

If it were possible and it probably is "Hopefully someone can put me right on this" I wouldn't mind if Calibre saved to disk a book twice once under the primary and second time under the secondary Author.

So when I look for a series manually Ill find it where it belongs and in an alternate place if need be..

Hard drive space is rarely an issue nowadays being a lot cheaper that what they used to be.

Cheers and avagreat day
curiosity is offline   Reply With Quote
Old 06-15-2011, 05:29 AM   #15
transmitthis
Addict
transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.transmitthis ought to be getting tired of karma fortunes by now.
 
transmitthis's Avatar
 
Posts: 285
Karma: 1003542
Join Date: May 2011
Device: Google Nexus 7 16GB
Backing up the entire librarys, seems to work best for me, once there are a few thousand books, having then in a separate windows folder structure seems too complicated for me. (anything to reduce it to its simplest form)
If I have the library on a computer with no Calibri, I know I can just browse to;
C:\Users\transmit\Calibre Library\Ted Chiang\The Lifecycle of Software Objects (229)
to find that Chiang book I wanted to read, so not really felt the need to have it organised further than it already is.

But each to their own, what ever makes you feel most comfortable.

Importing I do singularly or by Author, then add meta data individually, I like to make sure it's right. A bulk renaming utility helps to get the files in the right format first, ie Title - Author
Images - actually, I just got a program that will bulk edit the images, so once their correct I intend to resize them all in one go, so they look nice when in the cover flow view...

Getting rid of multiple Authors, that's an interesting idea, it would slim things down a bit too. I think I would miss the cross referencing it offers, Say you just read "Junk DNA" by Rudy Rucker, and was looking for something similar if it was labeled Rudy Rucker & Bruce Sterling, then a quick click on Bruce, would bring you to other reads you may like.

I do draw the line at compilations/anthology/collections etc as that would be silly, in those cases just the editor and then a list of the included stories and Authors in the Comments field is fine, and I believe it shows up in searches too.


Not really sure how you would go about finding all books with multiple Authors, apart from the obvious.. looking down the Authors Column and then editing manually....
Good luck with that anyway

Edit: - Actually as you will have to check which is the main Author / the one you want associated with the book, your going to have to do each individually, so just look at the Author Column, and Edit directly by clicking twice on the Name (not double clicking as it will open, but select then click, will allow inline editing on the columns themselths.

Last edited by transmitthis; 06-15-2011 at 05:50 AM. Reason: Because I can
transmitthis is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search/Replace Question seagull Sigil 22 03-21-2011 02:30 PM
Using the Search & Replace feature Manichean Conversion 0 01-26-2011 06:26 PM
Search & Replace Suggestion Philosopher Calibre 6 12-31-2010 12:55 PM
Search & Replace Pat Nickholds Sigil 2 10-22-2010 12:18 AM
Search & replace TEXT ToeRag Calibre 3 04-10-2010 02:44 PM


All times are GMT -4. The time now is 09:46 PM.


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