szarroug3 / X-Ray_Calibre_Plugin

X-Ray Creator plugin for Calibre
http://www.mobileread.com/forums/showthread.php?t=273189
GNU General Public License v3.0
57 stars 12 forks source link

Parse out "aka's" from description in ShelfariParser #30

Closed szarroug3 closed 8 years ago

szarroug3 commented 8 years ago

I'm not really sure how to do this because I don't know how to know where the end of the name would be. i.e John Doe - aka Jake. Jake is a tall man. vs ie. John Doe - aka Jake Doe. Jake is a tall man.

We could look for the punctuation at the end of the aka but we can't really guarantee that that will always be there.

stoduk commented 8 years ago

I'm a bit hazy, but from the comment I put in the old plugin I think we expect

"Jane McGuiness (aka Jane Maidenname)"

aka_regex = re.compile("(.*) +\(aka.? (.*)\)")

However, ISTR that this was free form - ie. whatever the user edited when they added the aka, rather than the website generating this from a list of aliases. So it looks like I thought it was always in parenthesis, and sometimes has a period after "aka".

Almost certainly a fix where we'll keep tweaking as we find new ways it can be broken :)

On 26 May 2016 at 15:25, Samreen Zarroug notifications@github.com wrote:

I'm not really sure how to do this because I don't know how to know where the end of the name would be. i.e John Doe - aka Jake. Jake is a tall man. vs ie. John Doe - aka Jake Doe. Jake is a tall man.

We could look for the punctuation at the end of the aka but we can't really guarantee that that will always be there.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/szarroug3/X-Ray_Calibre_Plugin/issues/30

szarroug3 commented 8 years ago

I don't think this is needed anymore -- Goodreads has aliases built-in