Hello,
I'm trying to write an applescript for bibdesk to assist with my migration from jabref. Here are my questions in brief, with more description below: 1) Is there a way to convert Bdsk-File references to paths from the command line without having to have BibDesk open? 2) Is there a way to add new fields to references using applescript? (Or at least make bibdesk actually save custom bibdesk fields, even though they're currently empty?) 3) What is the syntax for removing a field or linked file using applescript?


I have other perl scripts that I've written when I was using jabref that need to determine the paths to linked files for each bibtex entry. In jabref, there is a "File" field added to each entry whose value is a list of the format "{label1:path1:type1;label2:path2:type2;label3:path3:type3;...}" I don't mind modifying my script, but can't figure out how to convert the Bdsk-File references into useable posix paths from anything accessible to perl (e.g. perl itself, or anything from the command line). My next idea was to have an apple script callable from Bibdesk that would make an appropriately formated line based on the currently linked files, and set the "File" field to that. This works for entries that already have a "File" field, but not for new entries. I tried adding "File" as a custom bibtex field and making it default, but it seems to not actually be created and accessible to applescript unless the user (me) manually goes and enters something in it, which is time-consuming for a large number of entries. I've tried adding a new file using the following syntax, but haven't been able to get it to work, and can't find documentation:
make new field "File" at end of fields of thePub

I've tried looking at the source code, but it seems that I need to pass a nsstring name and a bibitem, and I haven't had any luck creating a bibitem, either. Lastly, can someone fill me in on the syntax to remove fields or linked files? I had originally been automatically creating ps files with notes for my references, and changed my program to create pdfs instead. This made all of the ps linked files invalid, but I couldn't remove them, and have too many files to go through by hand. I finally reverted to an earlier version of my .bib that hadn't been linked to external files, and relinked, but would like to know how to remove files for the future. I had tried something like "remove linked file lf from linked files of thePub" but had no luck.
Thanks in advance,
Eric
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bibdesk-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-develop

Reply via email to