Bookpedia CSV import ignores quotes

Report your bugs here - if someone else has already mentioned the same bug, just add on to their post with as much info as possible to make the hunting easier.
Post Reply
djwudi
Bruji Friend
Bruji Friend
Posts: 10
Joined: Tue Aug 05, 2008 8:23 am
Location: Renton, WA, USA
Contact:

Bookpedia CSV import ignores quotes

Post by djwudi »

Howdy --

I'm working on recovering from a system crash (ouch) in which I lost my Bookpedia data (double ouch).

The good news is that as I regularly use both Goodreads and LibraryThing, the data exists.

The bad news is that I'm running into problems with the .csv import. It seems that both Goodreads and LibraryThing export .csv files wherein many of the fields, while separated by commas, are also enclosed within quotation marks, in order to get around instances where commas appear within entries. For example (from my Goodreads export):

Code: Select all

"Spock, Messiah!","Theodore R. Cogswell","Cogswell, Theodore R.","","0553101595","9780553101591",0,3.50,"Bantam Books","Paperback","182",1976,1976,,06/14/09,to-read,to-read,,,,,,
Because Bookpedia seems to use a strictly literal interpretation of .csv files, rather than seeing the above entry (using an import set to ignore certain fields) as...
Title: Spock, Messiah!
Author: Theodore R. Cogswell
(skipped)
(skipped)
ISBN: 0553101595
...and so on, it imports as...
Title: "Spock
Author: Messiah!"
(skipped)
(skipped)
ISBN: Theodore R."
...and so on. Obviously, this results in a lot of useless data...and when I'm importing somewhere above 1,600 entries, that's a lot of useless data.

I'm trying to find a solution (unfortunately, it's difficult to do a straight search-and-replace, as replacing commas with tabs would create the same problem, and since some fields use the quotes and some don't, I can't do a search-and-replace on the quote-comma-quote combination), but so far have ended up with little luck and a lot of frustration.

Any advice on how to work around this -- or, perhaps, a fix in the next update to Bookpedia -- would be greatly appreciated!

Thanks much!
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Bookpedia CSV import ignores quotes

Post by Conor »

Sorry to hear about the crash, glad to hear you had an external data saved, even if it's in another format. Bookpedia expects consistency in the import and can't handle when only some of the fields are quoted. I wrote the import using the same thinking you are using in trying to fix the issue with the find and replace (looking for quote-comma-quote) and hence has the same weakness. Use a program like Excel that will be able to deal with the variable format and then re-export tab or all comma quoted from Excel. Someday I will re-write the algorithm so it can handle variable quotes, but it so more complex.
djwudi
Bruji Friend
Bruji Friend
Posts: 10
Joined: Tue Aug 05, 2008 8:23 am
Location: Renton, WA, USA
Contact:

Re: Bookpedia CSV import ignores quotes

Post by djwudi »

Not the answer I was looking for, but a good answer nonetheless. ;) Don't have Excel, but I'll see if Apple's Numbers can do the right kind of export. Thanks for the quick response!
Post Reply