Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import failed #248

Open
rhaynes74 opened this issue Dec 19, 2020 · 1 comment
Open

import failed #248

rhaynes74 opened this issue Dec 19, 2020 · 1 comment

Comments

@rhaynes74
Copy link

Hi folks, just started to play with pubs. Exported my .bib file from Zotero and tried an import. Didn't get too far and got a file not found message - this item has two files listed in the file= line in the .bib file. Didn't seem to like the .HTML file:

file = {/Users/rhaynes/Zotero/storage/CDJEJLSE/Abushammala et al. - 2015 - A novel fixed point iteration method for the solut.pdf;/Users/rhaynes/Zotero/storage/D57ASCSY/S0096300315012102.htm l},

Should this work?

R Haynes

@omangin
Copy link
Member

omangin commented Jan 10, 2021

Hi @rhaynes74, thanks for trying pubs and reporting this. Sorry for the response latency.

Do you have the exact error raised about the file not found?

After a quick look to https://github.com/pubs/pubs/blob/master/pubs/bibstruct.py#L81, it seems to me that the logic implemented there does not handle the Zotero case properly. To my knowledge, the file attribute is not really standard, specially with several files inside, and what we have implemented (that was done so mostly with the Mendeley use case in mind), only covers : as a separator, not ;. That could explain the issue you are facing.

For now I will mark the issue as enhancement, unless there is a standard that we fail to have implemented (in which case I would switch it to bug). Nevertheless, it should be feasible to implement a more Zotero-friendly behavior here. Either automatically, by allowing both separators, or through a command line argument to trigger some specific parsing behaviors for common sources. I assume your case would be rather common.

Please note that pubs only allows one document per entry so it would anyway only import the pdf in that case.

As a quick workaround, the import should work if you just keep one file per entry (here removing the html from the source .bib).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants