-
-
Notifications
You must be signed in to change notification settings - Fork 288
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
support Local-Zo-Url-x field from BibDesk2Zotero_attachments #667
Comments
Let me get this straight -- the BibDesk authors have their paths stored in bibtex as base-64 encoded binary plist files... wow. I think I can import |
yes, I think and yes, the symlinks are baffling to me, too. There are some upsides, if I recall (you can move the attachments without breaking the link or something), but just this gibberish freaks me out. and, as this goes to show, it really harms portability 😦 |
just fyi: barring a successful close on this issue, I've opened up a PR on the perl script repo that un-symlinks the attachment, just so people know that zbb now accepts |
This is still to be tested of course, but yes, once the change is confirmed to be working, that seems sensible. |
uh no, doesn't seem to work. Should I provide a test case zip? |
That'd be helpful. Please include the attachment and bib file, in the folder structure that you'd normally have them. |
here you go: Error report ID is This includes three references, two of which have (two each) attachments.
It is generated by the perl script from Let me know if there's anything else I can do to assist. |
Alright, try this |
Fantastic, works great. Except for this tiny hickup: It appears that when there are >1 attachments, those are all called Items with one attachment import fine and display the proper filename instead of |
I'd be a little surprised if it were tied to the number of attachments; when no title is given in the bib file, the title defaults to 'Attachment'. |
Mmh, I see. I'm not sure this (missing title in bib record) is that is going here. The record above in question does have a title. Also, scrolling through my import (>1000 records), I only find So empirically from my data, the link between |
I don't doubt your emperical results, but seeing as how I wrote the code... :) When I don't see a title, I default to "Attachment". I'd theorize that your attachments that aren't named "Attachment" come from jabref imports, which often do have titles for the attachments. The bibdesk attachments don't appear to have a title. |
I currently don't treat the file name as a title, btw. |
very sorry, I'm a bit confused. When you say attachment titles from jabref imports (never used it), do you mean some kind of metadata of the actual PDF, or inside the |
sorry, problem solved: the issue is on the side of the ZBB hardly ever created filenames for any of my data, because as you rightly pointed out, there is no title info for the attachment. So, everything's dandy. |
Sorry, hit the wrong button; will let you close if you see fit. Thanks for being so generous with your time and work. |
I don't have access to the attachments during import, I can only tell Zotero where to find them so it will import it. That's really all that the importers can do; prep data and politely ask Zotero to import it. No file access, no database access. So I can't read the title from the attachment. JabRef and some other bib managers do indeed write attachment metadata into the |
Sorry, missed your last comment. If BBT now works as you want it to I'll merge to master and cut a release. |
works like a charm; sorry about (my) confusion |
just for the record, the zotfile issue with multiple attachments that here appeared is filed at jlegewie/zotfile#283 Not a BBT issue. |
this is now merged, shipped in https://github.com/retorquere/zotero-better-bibtex/releases/tag/1.6.97 and closeable, correct? |
Correct. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
The popular Mac OS BibTex editor BibDesk (unfortunately) stores local attachments via symlinks like so:
Yikes.
Naturally, ZBB and/or Zotero can't deal with that, and you loose all attachments on import.
Happily, @pmcarlton has provided this a wonderful perl script that creates sane relative paths out of the above gibberish, and appends them to a custom
Local-Zo-URL-x
field, like so:Unfortunately, this is still not quite what Zotero and ZBB need, because
Local-Zo-Url-x
./
part of the path.I have so far search-and-replaced my files to fix this, but I feel dirty doing it.
Any chance ZBB could support such a field "out of the box"?
That would be huge for BibDesk refugees like myself.
Ps.: I am aware that @pmcarlton ships a patched
bibtex.js
with his perl script to deal with these problems, butThe text was updated successfully, but these errors were encountered: