Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-02-2010, 05:09 PM   #16
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by dkritso109 View Post
i still can't get the author to load from FN,LN to LN,FN. from what i have gathered i have to go back and redo them with search and replace correct? that is where i am still lost.
Turn on the option in Preferences|Import/Export|Adding Books|"Swap author firstname and lastname"
Starson17 is offline   Reply With Quote
Old 10-02-2010, 05:14 PM   #17
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by Starson17 View Post
Turn on the option in Preferences|Import/Export|Adding Books|"Swap author firstname and lastname"
Wait, there's an actual option for this? Jeez, I'm beginning to have some sort of regexp blindness (as in "everything can be solved by a regexp!").
Manichean is offline   Reply With Quote
Advert
Old 10-02-2010, 05:35 PM   #18
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by chaley View Post
Maybe you should volunteer to be his teenager.
chaley, I think he was talking about getting the kid to edit the metadata individually for all books he wants imported... that's no job for a kid, it's a job for a monkey. A well-trained one.
Apart from that, I'm too old to do a teenagers job, I'm afraid...
Manichean is offline   Reply With Quote
Old 10-02-2010, 08:34 PM   #19
bthrowsnaill
Dreamer
bthrowsnaill ought to be getting tired of karma fortunes by now.bthrowsnaill ought to be getting tired of karma fortunes by now.bthrowsnaill ought to be getting tired of karma fortunes by now.bthrowsnaill ought to be getting tired of karma fortunes by now.bthrowsnaill ought to be getting tired of karma fortunes by now.bthrowsnaill ought to be getting tired of karma fortunes by now.bthrowsnaill ought to be getting tired of karma fortunes by now.bthrowsnaill ought to be getting tired of karma fortunes by now.bthrowsnaill ought to be getting tired of karma fortunes by now.bthrowsnaill ought to be getting tired of karma fortunes by now.bthrowsnaill ought to be getting tired of karma fortunes by now.
 
bthrowsnaill's Avatar
 
Posts: 112
Karma: 501282
Join Date: Sep 2010
Location: Philadelphia, PA
Device: kindle
If the "input" string is this:

Armstrong, Kelley - Jauría

and the desired output is

Kelley Armstrong

then I think a correct search term would be this (so that it doesn't match anything after the author first name and omits the " - Jauria").

(\w*),\s{0,1}(\w*)\s.*

\2 \1 would still be the correct replacement string

I'm not sure if this will be helpful or not (and I haven't tested it so ymmv). I understand that the previously presented solutions assume that the lastname,firstname have been imported into the {Author} field and that they are meant only to parse in this (limited) context. I thought that a regex to match the author info from the full filename might be the missing link.

Last edited by bthrowsnaill; 10-02-2010 at 08:36 PM.
bthrowsnaill is offline   Reply With Quote
Old 10-03-2010, 03:09 AM   #20
kacir
Wizard
kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.
 
kacir's Avatar
 
Posts: 3,454
Karma: 10484861
Join Date: May 2006
Device: PocketBook 360, before it was Sony Reader, cassiopeia A-20
Quote:
Originally Posted by Manichean View Post
Wait, there's an actual option for this?
;-)
I am guilty as charged as well. I even knew there was an option. But the question asked for Regular expression, so I got, kinda ... carried away ...
Quote:
Originally Posted by Manichean View Post
Jeez, I'm beginning to have some sort of regexp blindness (as in "everything can be solved by a regexp!").
I am still looking for a RegExp solution that would process correctly
Armstrong Kelly AND Kelly, Armstrong (with optional series) in one go ;-)

And search and replace in field is good solution if you import lots of books that have BOTH notations, so you do not need to switch the option on and off.
I know, I know ... I have got a hammer and now every problem looks like a nail ;-)
kacir is offline   Reply With Quote
Advert
Old 10-03-2010, 05:19 AM   #21
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by bthrowsnaill View Post
If the "input" string is this:

Armstrong, Kelley - Jauría

and the desired output is

Kelley Armstrong

then I think a correct search term would be this (so that it doesn't match anything after the author first name and omits the " - Jauria").

(\w*),\s{0,1}(\w*)\s.*

\2 \1 would still be the correct replacement string

I'm not sure if this will be helpful or not (and I haven't tested it so ymmv). I understand that the previously presented solutions assume that the lastname,firstname have been imported into the {Author} field and that they are meant only to parse in this (limited) context. I thought that a regex to match the author info from the full filename might be the missing link.
I don't think that regexp would help in importing. It would match the lastname, firstname notation, yes, and allow for backreferences to the names, but to my knowledge, in importing, there's nowhere to input those backreferences. So you'd have to do a search and replace either way, and if you were to use the expression there, it should work fine.

@kacir: I have thought about how to do that as well, at this point I don't believe there is an elegant solution. Maybe if you could use backreferences in importing books, but as it stand now, there just is no way.
Manichean is offline   Reply With Quote
Old 10-03-2010, 05:58 AM   #22
kacir
Wizard
kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.
 
kacir's Avatar
 
Posts: 3,454
Karma: 10484861
Join Date: May 2006
Device: PocketBook 360, before it was Sony Reader, cassiopeia A-20
OK.
Here is what I use at this moment
(?P<author>[^-]+)( - \[?(?P<series>[^-]+)(\[| )+(?P<series_index>[0-9]+)\]?)? - (?P<title>.+)

It will process
Bitten.rtf
Armstrong, Kelley - Bitten.rtf
Armstrong, Kelley - Otherworld 1 - Bitten.rtf
Armstrong, Kelley - [Otherworld 1] - Bitten.rtf
Armstrong, Kelley - Otherworld [1] - Kelley Armstrong - Bitten.rtf
Kelley Armstrong - Otherworld 1 - Bitten.rtf
Kelley Armstrong - [Otherworld 1] - Bitten.rtf
Kelley Armstrong - Otherworld [1] - Bitten.rtf

At the end of the day you
- Select books you have added
- Right click, select Bulk Edit Metadata
- go to Search and Replace
- select Search mode Regular Expressions
- Search for ([^,]*), (.*)
- Replace expression \2 \1
- and, of course select Search Field and Destination Field "authors"

Not a single step, but better than adding thousands well organized books from an old hoard one by one ;-)

EDIT:
Do you want me to explain that monstrous (and almost unreadable by *me* - the author) Regular Expression in detail?

Last edited by kacir; 10-03-2010 at 06:01 AM.
kacir is offline   Reply With Quote
Old 10-03-2010, 06:02 AM   #23
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
@kacir: Yes, but that still requires the search & replace- pass after importing. I don't think there's currently a way to avoid that.

@dkritso109: Use what kacir described above. It's the best solution you'll get now.
Manichean is offline   Reply With Quote
Old 10-03-2010, 07:14 PM   #24
wladdy
Enthusiast
wladdy began at the beginning.
 
Posts: 28
Karma: 10
Join Date: Oct 2010
Device: iPad / Kindle DX
Kacir,

Quote:
(?P<author>[^-]+)( - \[?(?P<series>[^-]+)(\[| )+(?P<series_index>[0-9]+)\]?)? - (?P<title>.+)
Thank you for this expression, which proved very useful to me. I'd like to take you up on your offer to explain it in detail. I'm very new to this game, so please excuse in advance my ignorance.

This is what I make of it:

(?P<author>[^-]+)
matches any string of characters except the character - and make that string the 'author' field.
I don't get [^-]. Wouldn't that eliminate a possible hyphen from the name? Why not simply use (?P<author>.+), like you do for the title?

( - \[?(?P<series>[^-]+)(\[| )+(?P<series_index>[0-9]+)\]?)?
The whole expression between the first and the last parenthesis is followed by a question mark. Does this question mark mean that the whole expression can either not appear or appear once, thus letting us process two types of books (those with a series and those without)?
Again, I don't get the [^-].
I'm also not sure about the + in (\[| )+. Is it to process the possibility of an erroneous duplication of either a left bracket or a white space before the series index?

- (?P<title>.+)
This part seems clear enough: after the last whitespace hyphen whitespace sequence, all characters are the title. However, since [^-] was used for the author and the series, why not use it here as well?

A clarification would be most welcome. Thanks! W.
wladdy is offline   Reply With Quote
Old 10-04-2010, 04:04 AM   #25
kacir
Wizard
kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.
 
kacir's Avatar
 
Posts: 3,454
Karma: 10484861
Join Date: May 2006
Device: PocketBook 360, before it was Sony Reader, cassiopeia A-20
Hi. Welcome to Mobileread.
You might find this
https://www.mobileread.com/forums/showthread.php?t=99258
thread very informative.
Quote:
Originally Posted by wladdy View Post
(?P<author>[^-]+)
matches any string of characters except the character - and make that string the 'author' field.
Exactly.
Quote:
Originally Posted by wladdy View Post
I don't get [^-]. Wouldn't that eliminate a possible hyphen from the name? Why not simply use (?P<author>.+), like you do for the title?
Because the + quantifier is greedy and it would eat all the characters it could, including the possible first hyphen.
So if you have string
"<b> this is bold text </b>"
and you want to get rid of the hypertext tags, you might be tempted to write the search string as "<.*>" but that would eat up everything, including the first ">"
I could have used "non-greedy" version of the + quantifier, so the RE in question might look like (?P<author>.+?).
But I am old fashioned, I learned to write Regular Expressions using tools that do not support non-greedy quantifiers, and this way the RE is more universal/compatible across various implementations of RE engine.
This RE was created under the assumption that there are no hyphens in the name of the author or name of the series. This assumption works 99.5% of time, the rest of the books (0.5%) will have to be tweaked by hand
Quote:
Originally Posted by wladdy View Post
( - \[?(?P<series>[^-]+)(\[| )+(?P<series_index>[0-9]+)\]?)?
The whole expression between the first and the last parenthesis is followed by a question mark. Does this question mark mean that the whole expression can either not appear or appear once, thus letting us process two types of books (those with a series and those without)?
Exactly. the first and last parenthesis with the question mark make all series info optional.
I was tired of changing the RE back and forth when I needed to import book with series or without
Quote:
Originally Posted by wladdy View Post
Again, I don't get the [^-].
Explained above
Quote:
Originally Posted by wladdy View Post
I'm also not sure about the + in (\[| )+. Is it to process the possibility of an erroneous duplication of either a left bracket or a white space before the series index?
series number can be separated from the series name by square bracket or space or combination of those. So perhaps, we should replace + with a * to accommodate the situation when the series number is not separated by anything.
You see, I have created this Regular Expression gradually, with use. I wrote the first simple one, then I came across the book where it didn't work, so I tweaked it to work on that book as well ...
So far I have been processing books where
- author, (optional series info)?, title is separated by " - "
- the whole series or just series number might be enclosed in square bracket, so the RE is made to match also:
author - series - title
author - series 01 - title
author - [series] - title
author - [series 01] - title
author - series [01] - title
author - series [ 01] - title
and as a side effect might also match nonsense like
author - [series - title
author - [series [01 - title
author - series 01] - title
but in its current form wouldn't match
author - series01 - title
notice there is no space or square bracket separating series number

Quote:
Originally Posted by wladdy View Post
- (?P<title>.+)
This part seems clear enough: after the last whitespace hyphen whitespace sequence, all characters are the title. However, since [^-] was used for the author and the series, why not use it here as well?
because I want to eat-up all the remaining characters, so when there IS hyphen in the title, I will get it. I was working under assumption that hyphens in title are more probable that hyphens in author name.
Quote:
Originally Posted by wladdy View Post
Thanks!
You are welcome
kacir is offline   Reply With Quote
Old 10-04-2010, 09:54 AM   #26
dkritso109
Enthusiast
dkritso109 began at the beginning.
 
Posts: 43
Karma: 10
Join Date: Jun 2010
Device: Kindle 3
ok first off kacir your awesome,
(?P<author>[^-]+)( - \[?(?P<series>[^-]+)(\[| )+(?P<series_index>[0-9]+)\]?)? - (?P<title>.+)
this works great, this totaly solved my author sort issue.
the only problem is with the series numbers

Foster, Alan Dean - Catechist 02 - Carnivores of Light and Darkness

turns into this

Carnivores of Light and Darkness Foster, Alan Dean

please also keep in mind that i am having trouble keeping up with yalls techie kung-fu.
you guys are definately experts at this, while i am a measly little business major.

also one more thing:
i know nothing about the search and replace function, all of my 4000 + books are already in the Alan Dean Foster format how do i change them all to Foster, Alan Dean. what exactly do i need to do?

so just to recap:
1. my series loses their numbering
2. search and replace all authors to the author sort format in the author box

thanks guys for your awesome help so far, yall rock!!!

p.s. can anyone lend me a well trained monkey???
dkritso109 is offline   Reply With Quote
Old 10-04-2010, 10:16 AM   #27
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by dkritso109 View Post
ok first off kacir your awesome,
(?P<author>[^-]+)( - \[?(?P<series>[^-]+)(\[| )+(?P<series_index>[0-9]+)\]?)? - (?P<title>.+)
this works great, this totaly solved my author sort issue.
the only problem is with the series numbers

Foster, Alan Dean - Catechist 02 - Carnivores of Light and Darkness

turns into this

Carnivores of Light and Darkness Foster, Alan Dean
You might want to clarify what part of the above is in what metadata field. If I had to guess, I would say that those are the {title} and {author} fields and thus, from what I can see, the expression works. What is in the series fields?

Quote:
Originally Posted by dkritso109 View Post
please also keep in mind that i am having trouble keeping up with yalls techie kung-fu.
you guys are definately experts at this, while i am a measly little business major.
This has been linked before, but have a look at this post here. It aims to strenghten the regexp-fu even of tie-wearing people.

Quote:
Originally Posted by dkritso109 View Post
also one more thing:
i know nothing about the search and replace function, all of my 4000 + books are already in the Alan Dean Foster format how do i change them all to Foster, Alan Dean. what exactly do i need to do?

so just to recap:
1. my series loses their numbering
2. search and replace all authors to the author sort format in the author box
Ah, so here's the info I needed above... Do you get any series field? Is the numbering read into the series?
As for the search & replace- stuff here, that's a bit trickier. I suspect something like searching for
Code:
(.*)\s(.*?)
and replacing with
Code:
\2, \1
might do the trick, but I haven't tested it. The difficulty here lies in the fact that you can, as you have demonstrated, have author names with multiple first or last names that are separated by a space, and how do you go about discerning which is which?

Quote:
Originally Posted by dkritso109 View Post
p.s. can anyone lend me a well trained monkey???
My monkey is currently busy hacking a problem I have. I'll tell it you asked.

EDIT: If you were to search & replace for each author individually (or, to be more correct, edit the single firstname, single lastname cases in one go, then edit the double firstname, single lastname, and so on), then the problem would cease to exist, of course. In that case, you could write a custom-tailored regexp to match each author perfectly.

Last edited by Manichean; 10-04-2010 at 10:19 AM.
Manichean is offline   Reply With Quote
Old 10-04-2010, 10:56 AM   #28
dkritso109
Enthusiast
dkritso109 began at the beginning.
 
Posts: 43
Karma: 10
Join Date: Jun 2010
Device: Kindle 3
i am sooooo close i can feel it
now about your question of how it fills in the metadata card you are right it's like this:

Carnivores of Light and Darkness {Title} Foster, Alan Dean {Author(s)}

so my most important issue now is retaining the series names and numbers.

i want:

Foster, Alan Dean - Catechist 02 - Carnivores of Light and Darkness

to look like this:

Catechist 02 - Carnivores of Light and Darkness {Title} Foster, Alan Dean {Author(s)}

i totally understand what you mean about authors with multiple names and how it can confuse. i still need to find a way to convert most of my {Author(s)} so that they are in the {Author(s)} fields in the Author Sort format, but the search and replace info doesn't seem to be working. i don't know if i am doing it wrong or not understanding or what. but it doesn't change anything.

I don't want to start inputing them now as Foster, Alan Dean {Author(s)}, when i have 4000 books as Alan Dean Foster {Author(s)}
dkritso109 is offline   Reply With Quote
Old 10-04-2010, 11:06 AM   #29
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by dkritso109 View Post
i am sooooo close i can feel it
now about your question of how it fills in the metadata card you are right it's like this:

Carnivores of Light and Darkness {Title} Foster, Alan Dean {Author(s)}

so my most important issue now is retaining the series names and numbers.

i want:

Foster, Alan Dean - Catechist 02 - Carnivores of Light and Darkness

to look like this:

Catechist 02 - Carnivores of Light and Darkness {Title} Foster, Alan Dean {Author(s)}
So you don't want to have series information in the series field(s), but in the title field? If so, you need to adapt the regexp to include the series info in the title. Or, if you want to have your cake and eat it, you could import the book using the regexp above, which should include the series info in the relevant fields (by the way, you haven't answered the question: does the series field contain the series info?), and then later prepend the series info to the title field using a search & replace.

Quote:
i totally understand what you mean about authors with multiple names and how it can confuse. i still need to find a way to convert most of my {Author(s)} so that they are in the {Author(s)} fields in the Author Sort format, but the search and replace info doesn't seem to be working. i don't know if i am doing it wrong or not understanding or what. but it doesn't change anything.

I don't want to start inputing them now as Foster, Alan Dean {Author(s)}, when i have 4000 books as Alan Dean Foster {Author(s)}
So you're importing with lastname, firstname(s) in the authors field and want firstname(s) lastname? That's easy: Do a search in the authors field for
Code:
([^,]*),\s(.*?)
and replace with
Code:
\2 \1
Manichean is offline   Reply With Quote
Old 10-04-2010, 11:23 AM   #30
dkritso109
Enthusiast
dkritso109 began at the beginning.
 
Posts: 43
Karma: 10
Join Date: Jun 2010
Device: Kindle 3
omg! i totaly missed that my series have a series field completely missed that. yes the series field retains the info perfectly, buuuuuut i do want the series name and number in the {Title} field aswell.

and for your last question, i want to search and replace all my {Author(s)} that are in the Alan Dean Foster {Author(s)} format to be in the Foster, Alan Dean {Author(s)} format.

Search and Replace:

Alan Dean Foster {Author(s)} ---------> Foster, Alan Dean {Author(s)}

i just tried your search and replace code and it does nothing.

i can totally see the search and replace function as an extremely powerful tool, but i'm kinda scared to use it. back up time!!! also i'm hoping that there's a way to retain series name and number in the {Title} field without having to search and replace each and everytime i input a series.

Last edited by dkritso109; 10-04-2010 at 11:31 AM.
dkritso109 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Regular Expression Help Azhad Calibre 86 09-27-2011 02:37 PM
Regular Expression Help smartmart Calibre 5 10-17-2010 05:19 AM
Sigil 024 and regular expressions on "all HTML files" WS64 Sigil 4 08-13-2010 07:33 PM
Help with the regular expression Dysonco Calibre 9 03-22-2010 10:45 PM
Help: Is there a search expression for "books without Series"? LARdT Calibre 3 01-20-2010 09:34 PM


All times are GMT -4. The time now is 02:54 AM.


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