Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a bibliography on a subject (don't matter what subject it is, there is about 20 different files and about 1000 records). I need to convert it into csv (or any other table format which can be opened in Excel/LibreOffice Calc etc.)

Can anyone name a tool for this?

share|improve this question
add comment

2 Answers 2

up vote 9 down vote accepted

Open the .bib-files in Jabref and export it as OpenOffice .csv-files. You find the option under the menu File, Export

Jabref_export

Since you can run Jabreffrom the program's home page, you don't have to install it. You need Java, though.

share|improve this answer
    
Thanks. Jabref is cool thing. It's a bit strange but still cool. –  Georg Aug 31 '12 at 5:50
add comment

Best bet would be a scripting language, e.g. Python. I don't know if you are a programmer, but making a script taking each entry and converting them shouldn't be too long.

Here's a basic python script which accesses a few fields:

from pybtex.database.input import bibtex

#open a bibtex file
parser = bibtex.Parser()
bibdata = parser.parse_file("myrefs.bib")

#loop through the individual references
for bib_id in bibdata.entries:
    b = bibdata.entries[bib_id].fields
    try:
        # change these lines to create a SQL insert
        print(b["title"])
        print(b["journal"])
        print(b["year"])
        #deal with multiple authors
        for author in bibdata.entries[bib_id].persons["author"]:
            print(author.first(), author.last())
    # field may not exist for a reference
    except(KeyError):
        continue

You can adapt it to your needs and save desired fields to a .csv file.

share|improve this answer
    
I already thought about it. But I'm looking for a existing tool for it. and, actually, I don't know any scripting language –  Georg Aug 30 '12 at 18:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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