Rationalising an imported database

Any trouble you encounter with the Pedias, here's the place to ask for help.
Post Reply
danco
Addicted to Bruji
Addicted to Bruji
Posts: 94
Joined: Fri Aug 31, 2007 3:06 pm

Rationalising an imported database

Post by danco »

I have a very large database of books (over 4000) that I created in AppleWorks, and imported ok into BookPedia.

Probem is that the way I designed the database isn't brilliant, and I would like to update everything, to include more information better organised. One issue is that, because my old database was not clever enough, I have titles set so that words such as 'The' and 'A' appear at the end so I could sort alphabetically. Also if a book had an editor, I put the editor's name as author with (ed.) added. For istance

Giant Book of Myths and Legends, The
Mike Ashley (ed.)

And I only used Author and Title (plus Location, Borrowed by, and two custom fields), I did not include an ISBN.

I would be interested to know what people (especially Conor, of course) think is the best way to. I don't mind waiting until version 4, if that makes things easier.

It might turn out to be best manually modify items and then Get Advanced Info, though this is a fair bit of work.
User avatar
Conor
Top Dog
Posts: 5344
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Post by Conor »

The best solution is to use a text editor directly on the database while Bookpedia is not running. Bookpedia has no regular expression support but a good text editor will; (TextWrangler is free) with the database being XML you can leverage this advantage.

The file is ~/Library/Application Support/Bookpedia/info.xml make a copy of this file as backup since you will be modifying it outside Bookpedia.

So for example to fix the titles you would use a regular expression as such this (enter into the Find field):

Code: Select all

<key>Title</key>\r\t\t\t<string>(.*), The</string>
and then replace for:

Code: Select all

<key>Author</key>\r\t\t\t<string>The \1</string>
Then you can run the 'Get more info for selection' function from the Advanced menu. Without the ISBN there might be some wrong results for very common titles but because it uses both the author and the title, it should be the correct result most of the time. Looking at the cover you can see quickly if it got the correct result, those that it did not, drag to a new collection. In the new collection select all and use the edit multiple to wipe out the incorrect information and then do get more info from inside the edit window with the gear button as this will allow you to choose the correct results, instead of Bookpedia picking the first one. And you can use the next button to add more info to each entry as all the entries in this collection need to have the correct result chosen.

Version 4 would help in that it has undo; but would make the XML thing harder as the database is SQL, so you have to do an export to XML and then an import.
danco
Addicted to Bruji
Addicted to Bruji
Posts: 94
Joined: Fri Aug 31, 2007 3:06 pm

Post by danco »

Thanks for the help.

From what you say, the best thing looks likely to be to fix the titles now by the method you suggest, and then leave getting the additional info until version 4.

I've been creating a new database with all the books (nearly 300) I own that had not been in my previous catalogue. Very smooth with Bookpedia and CueCat, except that a few codes would not scan and I had to enter them manually.

At some later date I will export this database and import it into the big one.
Post Reply