I'm seeking a way to get my books database, stored on Goodreads, into BibTeX form. As near as I can tell, Goodreads provides no support for this directly, but does provide for CSV export (on the right). Are there tools I could used to import from the CSV file into BibTeX?

FWIW, the fields exported by goodreads are

Book Id,Title,Author,Author l-f,Additional Authors,ISBN,ISBN13,My Rating,Average Rating,Publisher,Binding,Number of Pages,Year Published,Original Publication Year,Date Read,Date Added,Bookshelves,Bookshelves with positions,Exclusive Shelf,My Review,Spoiler,Private Notes,Read Count,Recommended For,Recommended By,Owned Copies,Original Purchase Date,Original Purchase Location,Condition,Condition Description,BCID

and I can, of course, easily rearrange their order or convert to other delimiters.

  • 1
    It seems you can set up a custom import filter for JabRef for such a thing: jabref.sourceforge.net/help/CustomImports.php – Torbjørn T. Mar 18 '12 at 21:38
  • @TorbjørnT.: That has possibilities; but ideally I'd like to avoid writing Java code. – orome Mar 18 '12 at 21:48
  • 1
    I would write a small AWK script to do that. You can probably equally easy accomplish the task using Tcl, Perl, Python, or Ruby (I know Python and barely some Perl). I would definitely not use JabRef and I would refuse to program in Java even if you point a gun into my my head. – Predrag Punosevac Mar 19 '12 at 4:53
  • @PredragPunosevac: I agree! Fortunately it turns out that a bit of bash and the Web did the job. – orome Mar 20 '12 at 4:44

I won't give complete answer, but some suggestions (it would have to be really worked on to make it complete).

There are tools:

The problem is that xml2bib needs a very special format called Metadata Object Description Schema: MODS.

Below, I give example file of my thesis .bib bibliography, converted to the correct .xml MODS format by bib2xml and coverted back to a .bib file by xml2bib. It illustrates how complicated the XML format is:

I apologize for the long file listings but I don't have a reliable online file storage.

    AUTHOR = {Beardon, Alan F.},
     TITLE = {The geometry of discrete groups},
    SERIES = {Graduate Texts in Mathematics},
    VOLUME = {91},
      NOTE = {Corrected reprint of the 1983 original},
 PUBLISHER = {Springer-Verlag},
   ADDRESS = {New York},
      YEAR = {1995},
     PAGES = {xii+337},
      ISBN = {0-387-90788-2},
 XXMRCLASS = {22E40 (11F06 20H15 30F35 57N10)},
XXMRNUMBER = {1393195 (97d:22011)},

    AUTHOR = {Ford, Lester R.},
     TITLE = {The fundamental region for a {F}uchsian group},
   JOURNAL = {Bull. Amer. Math. Soc.},
  FJOURNAL = {Bulletin of the American Mathematical Society},
    VOLUME = {31},
      YEAR = {1925},
    NUMBER = {9-10},
     PAGES = {531--539},
      ISSN = {0002-9904},
 XXMRCLASS = {Contributed Item},
XXMRNUMBER = {1561111},
       DOI = {10.1090/S0002-9904-1925-04104-X},
       URL = {http://dx.doi.org/10.1090/S0002-9904-1925-04104-X},

    AUTHOR = {K{\r{u}}rka, Petr},
     TITLE = {A symbolic representation of the real {M}\"obius group},
   JOURNAL = {Nonlinearity},
  FJOURNAL = {Nonlinearity},
    VOLUME = {21},
      YEAR = {2008},
    NUMBER = {3},
     PAGES = {613--623},
      ISSN = {0951-7715},
     CODEN = {NONLE5},
 XXMRCLASS = {37F30 (37B10)},
XXMRNUMBER = {2396619 (2009j:37073)},
MRREVIEWER = {Jiri Fiser},
       DOI = {10.1088/0951-7715/21/3/012},
       URL = {http://dx.doi.org/10.1088/0951-7715/21/3/012},

<?xml version="1.0" encoding="UTF-8"?>
<modsCollection xmlns="http://www.loc.gov/mods/v3">
<mods ID="beardon">
        <title>The geometry of discrete groups</title>
    <name type="personal">
        <namePart type="given">Alan</namePart>
        <namePart type="given">F</namePart>
        <namePart type="family">Beardon</namePart>
            <roleTerm authority="marcrelator" type="text">author</roleTerm>
            <placeTerm type="text">New York</placeTerm>
    <genre authority="marcgt">book</genre>
    <relatedItem type="host">
            <title>Graduate Texts in Mathematics</title>
    <note>Corrected reprint of the 1983 original</note>
    <identifier type="isbn">0-387-90788-2</identifier>
    <identifier type="citekey">beardon</identifier>
        <detail type="volume"><number>91</number></detail>
<mods ID="ford">
        <title>The fundamental region for a Fuchsian group</title>
    <name type="personal">
        <namePart type="given">Lester</namePart>
        <namePart type="given">R</namePart>
        <namePart type="family">Ford</namePart>
            <roleTerm authority="marcrelator" type="text">author</roleTerm>
    <relatedItem type="host">
            <title>Bull. Amer. Math. Soc.</title>
        <genre authority="marcgt">periodical</genre>
        <genre>academic journal</genre>
        <identifier type="issn">0002-9904</identifier>
    <identifier type="citekey">ford</identifier>
    <identifier type="doi">10.1090/S0002-9904-1925-04104-X</identifier>
        <detail type="volume"><number>31</number></detail>
        <detail type="number"><number>9-10</number></detail>
        <extent unit="page">
<mods ID="k:sr_rmg">
        <title>A symbolic representation of the real Möbius group</title>
    <name type="personal">
        <namePart type="given">Petr</namePart>
        <namePart type="family">K\rurka</namePart>
            <roleTerm authority="marcrelator" type="text">author</roleTerm>
    <relatedItem type="host">
        <genre authority="marcgt">periodical</genre>
        <genre>academic journal</genre>
        <identifier type="issn">0951-7715</identifier>
    <identifier type="citekey">k:sr_rmg</identifier>
    <identifier type="doi">10.1088/0951-7715/21/3/012</identifier>
        <detail type="volume"><number>21</number></detail>
        <detail type="number"><number>3</number></detail>
        <extent unit="page">

author="Beardon, Alan F.",
title="The geometry of discrete groups",
series="Graduate Texts in Mathematics",
address="New York",
note="Corrected reprint of the 1983 original",

author="Ford, Lester R.",
title="The fundamental region for a Fuchsian group",
journal="Bull. Amer. Math. Soc.",

author="K{\backslash}rurka, Petr",
title="A symbolic representation of the real M{\"o}bius group",

Now: The following is an input file with header and one bibliography item (containing for each field the filed name with abc...xyz dummy text). I believe that the output XML file could be converted into the MODS format, but I'm not sure how and it will be a lot of work. The why that I thought of is replacing each string of the form <Title> to the string of XML markups that stands before the Title in the correct format.

Book Id,Title,Author,Author l-f,Additional Authors,ISBN,ISBN13,My Rating,Average Rating,Publisher,Binding,Number of Pages,Year Published,Original Publication Year,Date Read,Date Added,Bookshelves,Bookshelves with positions,Exclusive Shelf,My Review,Spoiler,Private Notes,Read Count,Recommended For,Recommended By,Owned Copies,Original Purchase Date,Original Purchase Location,Condition,Condition Description,BCID
abcBook Idxyz,abcTitlexyz,abcAuthorxyz,abcAuthor l-fxyz,abcAdditional Authorsxyz,abcISBNxyz,abcISBN13xyz,abcMy Ratingxyz,abcAverage Ratingxyz,abcPublisherxyz,abcBindingxyz,abcNumber of Pagesxyz,abcYear Publishedxyz,abcOriginal Publication Yearxyz,abcDate Readxyz,abcDate Addedxyz,abcBookshelvesxyz,abcBookshelves with positionsxyz,abcExclusive Shelfxyz,abcMy Reviewxyz,abcSpoilerxyz,abcPrivate Notesxyz,abcRead Countxyz,abcRecommended 

  <Book_Id>abcBook Idxyz</Book_Id>
  <Author_l_f>abcAuthor l-fxyz</Author_l_f>
  <Additional_Authors>abcAdditional Authorsxyz</Additional_Authors>
  <My_Rating>abcMy Ratingxyz</My_Rating>
  <Average_Rating>abcAverage Ratingxyz</Average_Rating>
  <Number_of_Pages>abcNumber of Pagesxyz</Number_of_Pages>
  <Year_Published>abcYear Publishedxyz</Year_Published>
  <Original_Publication_Year>abcOriginal Publication Yearxyz</Original_Publication_Year>
  <Date_Read>abcDate Readxyz</Date_Read>
  <Date_Added>abcDate Addedxyz</Date_Added>
  <Bookshelves_with_positions>abcBookshelves with positionsxyz</Bookshelves_with_positions>
  <Exclusive_Shelf>abcExclusive Shelfxyz</Exclusive_Shelf>
  <My_Review>abcMy Reviewxyz</My_Review>
  <Private_Notes>abcPrivate Notesxyz</Private_Notes>
  <Read_Count>abcRead Countxyz</Read_Count>
  <Recommended_For>abcRecommended Forxyz</Recommended_For>
  <Recommended_By>abcRecommended Byxyz</Recommended_By>
  <Owned_Copies>abcOwned Copiesxyz</Owned_Copies>
  <Original_Purchase_Date>abcOriginal Purchase Datexyz</Original_Purchase_Date>
  <Original_Purchase_Location>abcOriginal Purchase Locationxyz</Original_Purchase_Location>
  <Condition_Description>abcCondition Descriptionxyz</Condition_Description>

Since the CSV has an ISBN for each book, and since all of the information I need for BibTeX can be reconstructed from the ISBN, all I need to do is use the ISBN column from the CSV to create an array, and then generate a file containing the corresponding BibTeX information:

#Generate a BibTeX bibliography from an array of ISBNs

array=(<pasted column of ISBNs>)

rm goodreads.bib
for isbn in "${isbnarray[@]}"
    curl http://manas.tungare.name/software/isbn-to-bibtex/isbn-service?isbn=$isbn >> goodreads.bib

And that's it.

  • No worries. I'm still interested in a general answer. – orome Mar 20 '12 at 12:32

I do not use Goodreads, but I suggest that you try Zotero, and see if Zotero can import directly. Maybe it is able to fetch all your books directly in one operation. Zotero standalone works with different browser and on different platforms.

Try it, it is free so you do not waste any money.

MarcEdit + Bibutils
A two step solution is using MarcEdit: You can import a delimited file (f.ex. CSV) directly. Then it is just to save it to any suitable format supported by your .bib-file manager. If you need to clean up or manipulate the CSV-files, you can use Sam Franche’s CSVed.

Complete solution: Import your CSV-files into MarcEdit. Save as MODS-file. You can then use bibutils to convert from MODS-format into bibtex, as recommended by tohecz.

You can also import a MODS-file exported from MarcEdit into Zotero, clean it up and export it to bibtex-format.

Jabref can import several formats, but I am not absolute sure any of those can be exported from MarcEdit. JabRef also read from SQL databases (MySQL etc). You can import your CSV-files into a MySQL table, let JabRef import it and export it as an .bib-file.

  • Ad MarcEdit: Do you know any such "suitable format"? – yo' Mar 19 '12 at 16:14
  • I don't argue, I asked about MarcEdit. – yo' Mar 19 '12 at 20:00
  • ... then I think that MarcEdit+bibutils can provide a complete solution for the original poster ;) – yo' Mar 19 '12 at 20:22

Tellico can import from csv and then exporto to bibtex

  • Welcome to TeX.SX, and thank you for sharing your answer! If you want, you can have a look at our starter guide to familiarize yourself further with our format. – ebosi Jun 7 '16 at 7:10

I have a simplest solutions and more trustfull I think. In https://doi.org/ you have all the DOIs registered, and the website just have bib format return. If you access https://doi.org/$doi, you get all the informations releated.

So, you can use as follow:

curl -LH "Accept: application/x-bibtex; charset=utf-8" https://doi.org/$doi

And you get:

    doi = {10.1007/978-3-319-46031-4_16},
    url = {https://doi.org/10.1007%2F978-3-319-46031-4_16},
    year = 2016,
    month = {dec},
    publisher = {Springer International Publishing},
    pages = {147--149},
    author = {Arnor Solberg and Peter Matthews},
    title = {Conclusion and Future Research},
    booktitle = {Model-Driven Development and Operation of Multi-Cloud Applications}

In my case, I needed to convert because Springer doesnt have bib format to export. So I export to CSV, isolated DOI column and save in a file named doi.txt (1 DOI per line) and then, I created a simplest script.

for doi in `cat doi.txt`
    do echo "Downloading line > $doi"
    curl -LH "Accept: application/x-bibtex; charset=utf-8" https://doi.org/$doi >> result.bib;
  • I know that is a beginner question, but... What can I do to run this script? "for doi in cat doi.txt do echo "Downloading line > $doi" curl -LH "Accept: application/x-bibtex; charset=utf-8" doi.org/$doi >> result.bib;" Thanks! – Lucas Bonino Jun 23 '20 at 2:20
  • @LucasBonino This script runs in command prompt. Press Windows Key+R key in windows and write cmd.exe, consequently press Enter to launch command prompt. Then paste the above script. Modify it to as per your requirement. – Programmer Aug 17 '20 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.