View Single Post
Old 09-25-2010, 05:39 PM   #8
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 _Em View Post
I plan to identify the merge records by parsing the following tree:
Code:
Check for Title
If exists,
  Check for author
  If exists,
    Check for format
    If exists, end
    else
      get book ID
      merge books
else
  add book
The code find_identical_books at line 561 of database2.py basically does this, but in reverse. It starts with the author, instead of title, then does a fuzzy match on the book titles by that author (removes spaces, punctuation, etc.) to find "identical" books.

That code is used in add.py (line 159) to do the autosort/automerge work.

I was a bit confused by your comment that there was "no command line merge function" as I couldn't see many situations where you'd know the books to be merged outside of the GUI (i.e. how you would know the ID, other than by writing code to search for books to be merged.) I can see where you'd like the autosort/automerge of new formats into existing records, however.
Starson17 is offline   Reply With Quote