A blog by Rob J Hyndman 

Twitter Gplus RSS

Creating a BibTeX file from a Google Library

Published on 27 March 2008

As you will have seen if you poke around these pages, I have a Google Library of books in sta­tis­tics and fore­cast­ing. This is intended to be a com­plete copy of what is on the shelves in my office (about 400 books), plus books that I would like on my shelves if I had more space.

I find the library use­ful for keep­ing track of books that my stu­dents and col­leagues bor­row (I just add a tag con­tain­ing their name to the book). It is also use­ful when search­ing for a book on a par­tic­u­lar topic, espe­cially as Google pro­vides con­tent searches of many books.

Sim­i­lar facil­i­ties are pro­vided by Library­Thing, but I find the Google Books inter­face nicer to use and it also has the in-​​text search­ing which is amazing.

Recently I thought it would be use­ful to cre­ate a Bib­TeX file of these books. Unfor­tu­nately, Google does not pro­vide a Bib­TeX export of books (unlike Google Scholar where there is a very handy Bib­TeX export facil­ity). In the improb­a­ble event that any­one else attempts this, here is how I did it.

  1. I exported my Google library as an xml file.
  2. I signed up for a life-​​time Library­Thing account for US$25. Not that I wanted to use Library­Thing, but there is a Bib­TeX export facil­ity which I wanted to use.
  3. I imported my Google Library into Library­Thing sim­ply by upload­ing the xml file saved earlier.
  4. I waited for a while for the library to be cre­ated. (I’m not sure how long it was because I had a tea-​​break, but it was less than 30 minutes.)
  5. I went to /kevin.godby.org/lt2bib/ where I fol­lowed the prompts to save my Library­Thing as an xls file, then to con­vert it to a bib file.
  6. I loaded the bib file into JabRef to auto­gen­er­ate the bib­tex keys using the pat­tern I use (e.g., “Hyndman08” for a sin­gle author paper in 2008 and HKOS08 for the book by Hyn­d­man, Koehler, Ord and Sny­der in 2008.)
  7. Then there was a lot of edit­ing of the bib file to remove dupli­cates, etc.

Prob­lems:

  • Library­Thing is hope­less at iden­ti­fy­ing all the authors. Often it just lists the first author. I couldn’t find any way around that. So my bib file has lots of entries with only the first author listed. I’ll have to fix these by hand over time.
  • The titles often con­tain extra­ne­ous infor­ma­tion such as edi­tion num­bers, series infor­ma­tion, etc. Again, this will require some man­ual editing.
  • I can’t see any way of updat­ing my bib file as I add books to my Google Library. Does any­one have any bright ideas?

Related Posts:


 
Tags:
4 Comments  comments 
  • Bill

    Thanks for a great piece of work.
    I have a library on Library­thing and another on Google books.
    I would like them both on a desk­top app and this method is the only one I can find.
    Library thing only exports in CSV or Tab Delim­ited and Google books only in an XML which no other app will look at. Very unfriendly!
    Thanks again

    Bill

  • http://www.pitt.edu/~upjecon Tom McGa­ha­gan

    A per­haps eas­ier path is to get the Zotero add-​​in for Fire­fox, which allows rapid down­load­ing of your Google library, and per­mits you to export the Zotero library as a bib­tex file.

    Although I haven’t used it, there is also an add-​​in for the Zotero add-​​in, called LyZ, which allows one to use the Zotero library in LyX while edit­ing your document.

    Tom

  • Mike

    Maybe you should try Google Scholar? I think there you can find all the books from Google Books as well, but with a Bib­TeX cita­tion, which can be acti­vated in the options.

    • http://robjhyndman.com Rob J Hyndman

      Google scholar is great for get­ting bib­tex entries on indi­vid­ual items, but there is no way (as far as I know) to import a whole Google library into Google scholar and extract all the bib­tex cita­tions as a sin­gle file.