Gnome Do Bibtex plugin cannot parse pdf path

Bug #335024 reported by Guido Conaldi
0
Affects Status Importance Assigned to Milestone
Do Plugins
New
Undecided
Unassigned

Bug Description

Tested with the test.bib file attached. The path in the file field is correct, and the .bib file is correctly parsed by bibtex plugin, however the .pdf file cannon be opened through gnome do.
This is a possibly related error:

Do.Addins.Bibtex.BibtexItemSource "Bibtex Articles" encountered an error in ChildrenOfItem: Argument cannot be null.
Parameter name: source.

Revision history for this message
Guido Conaldi (guido-conaldi) wrote :
Revision history for this message
krishna (krishhere) wrote :

Seems like the .bib file should contain a file = {} entry.
My .bib file had a pdf = {} entry for all files. So I defined a new field in my .bib file and copied pdf = {} entries to file = {}.
Then I restarted my gnome-do.

The plugin now works like a charmm!!

Revision history for this message
krishna (krishhere) wrote :

In fact here is the python script I used to convert my old bib file

#!/usr/bin/python
# program to add file = {} field to a .bib file
# This will copy the entry of pdf = {} field to file = {}
#

filep = open("complete_ref.bib")
fileo = open("new_complete_ref.bib","w")

count = 0
count_entry = 0
for line in filep:

    try:
        if line[0] == "@":
            count_entry += 1

        if line.split("=")[0].strip() == "pdf" :
            count += 1
            fileo.write(" file ="+line.split("=")[1])

        print "total entries, entries with files = ", count_entry, count

    except:
        pass

    fileo.write(line)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.