That looks like it just drops the second file. Also problematic when anything else, like a title, has a semicolon in it.
Christiaan > On 28 Dec 2020, at 22:09, Ronald Haynes <rhayne...@gmail.com> wrote: > > Hi folks, I was able to conjure up a little vi magic to handle this: > > :%s/;.*/}/ > > Sincerely, > > Dr. Ronald D. Haynes > > Professor, Department of Mathematics and Statistics > Chair, MSc and PhD Scientific Computing Programs > Memorial University of Newfoundland > > We acknowledge that the lands on which Memorial University’s campuses are > situated are in the traditional territories of diverse Indigenous groups, and > we acknowledge with respect the diverse histories and cultures of the > Beothuk, Mi’kmaq, Innu, and Inuit of this province. > On Dec 28, 2020, 2:40 PM -0330, Christiaan Hofman <cmhof...@gmail.com>, wrote: >> >> >>> On 28 Dec 2020, at 17:15, Ronald Haynes <rhayne...@gmail.com >>> <mailto:rhayne...@gmail.com>> wrote: >>> >>> Hi folks, so I have made some progress with links to attachments using a >>> .bib file generated by zotero/better-bibtex. All entries work except for >>> entries with multiple attachments. Several of my .bib entries have file >>> fields that look like: >>> >>> /Users/rhaynes/Zotero/storage/QYXFGM6P/Peña_1995_M-matrices whose inverses >>> are totally >>> positive.pdf;/Users/rhaynes/Zotero/storage/ZQNHFBL9/002437959300244T.html >>> >>> >>> Bibdesk is not able to decipher the link to the pdf file. Any >>> suggestions? >>> >>> Sincerely, >>> >>> Dr. Ronald D. Haynes >>> >>> Professor, Department of Mathematics and Statistics >>> Chair, MSc and PhD Scientific Computing Programs >>> Memorial University of Newfoundland >> >> BibDesk cannot by itself understand multiple files in the same field. It is >> also ambiguous, as the semicolon is also a valid path character. >> >> You could try to use AppleScript to convert these fields into linked files. >> I don’t know if you are versed in AppleScript? >> >> The following script should do what you want (disclaimer: not fully tested, >> as I don’t have these fields). >> >> tell application "BibDesk" >> tell front document >> set AppleScript's text item delimiters to {";"} >> repeat with aPub in publications >> tell (contents of aPub) >> set theValue to value of field "File" >> if theValue contains ";" then >> set theFileNames to text items of >> theValue >> repeat with theFileName in theFileNames >> set theFileName to contents of >> theFileName >> if theFileName ≠ "" then >> set theFile to resolve >> theFileName >> try >> theFile as alias >> if (get linked >> files) does not contain theFile then >> add >> theFile >> end if >> end try >> end if >> end repeat >> end if >> end tell >> end repeat >> set AppleScript's text item delimiters to {""} >> end tell >> end tell >> >> Christiaan >> >> _______________________________________________ >> Bibdesk-users mailing list >> Bibdesk-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/bibdesk-users > _______________________________________________ > Bibdesk-users mailing list > Bibdesk-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bibdesk-users Christiaan
_______________________________________________ Bibdesk-users mailing list Bibdesk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-users