Re: [Bibdesk-users] URLs in formatted citations, deprecated fields, and such
Something is wrong with the AppleScript when it's run as a script hook. It's really a long standing, IMHO serious, bug in AppleScript's handling of files. Apparently Apple has made the problem worse rather than fix it since the last time I tested this script. I have posted a fixed version of the script hook on the Wiki that doesn't use Finder's buggy scripting support. It also includes conversion of remote URLs, though you have to turn that on using a property at the beginning of the script. Christiaan On 5 Dec 2008, at 1:56 AM, Nathan Paxton wrote: Sorry, I should be clearer. This is what happens when you try to work through a headache. The script hook does not generate a local-url field when I drop a file from my hard drive onto the sidebar. When I drop a local file onto the sidebar, I can see no change in the entry (as opposed to when I run the same script manually, when the Local-Url and Url fields are generated immediately). Best, -Nathan -- Nathan A. Paxton Ph.D. Candidate Dept. of Government, Harvard University Resident Tutor John Winthrop House, Harvard University napaxton AT fas DOT harvard DOT edu http://www.fas.harvard.edu/~napaxton = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = == When you have to stay eight years away from California, you live in a perpetual state of homesickness. - Ronald Reagan The most courageous act is still to think for yourself. Aloud. -Coco Chanel = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = == On 4 Dec 2008, at 7:53 PM, Christiaan Hofman wrote: Huh? It does not generate a file, it only generates a Local-Url field. Christiaan On 5 Dec 2008, at 1:46 AM, Nathan Paxton wrote: Hmm. This helps. I will try it post-haste, but there does not seem to be an automatic generation of the linked file on my hard drive when I drop the PDF onto the sidebar. Best, -Nathan -- Nathan A. Paxton Ph.D. Candidate Dept. of Government, Harvard University Resident Tutor John Winthrop House, Harvard University napaxton AT fas DOT harvard DOT edu http://www.fas.harvard.edu/~napaxton = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = When you have to stay eight years away from California, you live in a perpetual state of homesickness. - Ronald Reagan The most courageous act is still to think for yourself. Aloud. -Coco Chanel = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = On 4 Dec 2008, at 7:41 PM, Christiaan Hofman wrote: On 5 Dec 2008, at 1:28 AM, Nathan Paxton wrote: Alex (et al.), That was exactly what I needed. I had sort of inferred that something like that might be the case. And Christiaan's clarification that the hook only gets invoked (in this case) upon some action helps also. So, I'd be happy to write some clarification of what each of the hooks do, after I figure that out. Now, I've added the LinkedFilesToFields script to the Add File or URL hook. My understanding is that when I drop a webpage or PDF document into the entry window sidebar, I should get a Url or Local-Url field generated, with the path to the webpage or document in it. Is that it? Because the Url field generation only occurs when I manually run the script on the entry, not automatically upon dropping a weblink onto the sidebar. The script hook on the Wiki only handles linked files, not linked URLs. It's not too hard though to modify the script to also handle remote URLs. Basically, you should copy the if block for Local File, and add a else if block to it for Remote URL. Something like this: ... else if theField is Remote URL then repeat with thePub in thePubs tell thePub if ((count of (get linked URLs)) 0) then set theURL to linked URL 1 set the value of field Url to theURL end if end tell end repeat end if Also note that the script hook only copies the first linked file, while the script from the list copies all linked files or URLs (if there are more than one). Christiaan Thanks for all the help, all. Best, -Nathan -- Nathan A. Paxton Ph.D. Candidate Dept. of Government, Harvard University Resident Tutor John Winthrop House, Harvard University napaxton AT fas DOT harvard DOT edu http://www.fas.harvard.edu/~napaxton = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Re: [Bibdesk-users] URLs in formatted citations, deprecated fields, and such
Okey-dokey. I got this working. SInce I can't post this rev'd bit of script to the wiki, I'll post the text here. And I'll document what it is supposed to do. So maybe it can be found on a search engine search. Begin documentation This is the LocalFileToLocal-UrlScriptHook with the alteration that Christiaan suggested to do the same to the Bibtex entry with remote URLs as is done with local files; that is, it automatically generates a Url field when a website is added to the entry's sidebar (just as it does with local files and generating a Local-Url). To make it work, you must go to the Script Hook preferences, and add it for the value for Add File or URL. (* Use this as a script hook for Did Auto File or Add File or URL. *) -- the format of the Local-Url field property useFileURL : false property useRelativePath : true using terms from application BibDesk on perform BibDesk action with publications thePubs for script hook theScriptHook tell application BibDesk set theField to get field name of theScriptHook as string set theDoc to get document of theScriptHook set theDocDir to my containerPath(get file of theDoc) if theField is Local File then repeat with thePub in thePubs tell thePub if ((count of (get linked files)) 0) then if useFileURL then set thePath to URL of linked file 1 else set thePath to POSIX path of (get linked file 1) if useRelativePath then set thePath to my relativePath(thePath, theDocDir) end if end if set the value of field Local-Url to thePath end if end tell end repeat else if theField is Remote URL then repeat with thePub in thePubs tell thePub if ((count of (get linked URLs)) 0) then set theURL to linked URL 1 set the value of field Url to theURL end if end tell end repeat end if end tell end perform BibDesk action with publications end using terms from on containerPath(theFile) tell application Finder set theContainer to get container of (theFile as alias) return POSIX path of (theContainer as alias) end tell end containerPath on relativePath(fullPath, basePath) set theLength to length of basePath if (length of fullPath theLength) and (text 1 thru theLength of fullPath) = basePath then return text theLength thru end of fullPath else return fullPath end if end relativePath (* end script *) I really did not do much here, except take the suggestion made about remote URLs in an e-mail sometime yesterday and add it to the modified script that C. posted on the wiki. (That is, I copied the lines given in yesterday's e-mail [for the if statement beginning with else if theField is Remote URL... ] and pasted them in what seemed an appropriate spot. This is just an aggregation of different pieces of script floating on the wiki, mailing list, etc.) But this is a more complete/alternate version of the script, if you want both local and remote files to be added to the entry as fields for Bibtex to use in creating a bibliography. End semi-documentation Hope this helps someone else! Best, -Nathan -- Nathan A. Paxton Ph.D. Candidate Dept. of Government, Harvard University Resident Tutor John Winthrop House, Harvard University napaxton AT fas DOT harvard DOT edu http://www.fas.harvard.edu/~napaxton = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = If every professor who backed a lunatic politician were to be sacked, half the interesting minds in academia would be lost. - The
Re: [Bibdesk-users] URLs in formatted citations, deprecated fields, and such
Note that a slightly better version of this script hook is now posted on the Wiki, as a replacement of the previous version. It does not rely on the Finder scripting support, which doesn't work in my recent tests. Christiaan On 5 Dec 2008, at 5:33 PM, Nathan Paxton wrote: Okey-dokey. I got this working. SInce I can't post this rev'd bit of script to the wiki, I'll post the text here. And I'll document what it is supposed to do. So maybe it can be found on a search engine search. Begin documentation This is the LocalFileToLocal-UrlScriptHook with the alteration that Christiaan suggested to do the same to the Bibtex entry with remote URLs as is done with local files; that is, it automatically generates a Url field when a website is added to the entry's sidebar (just as it does with local files and generating a Local- Url). To make it work, you must go to the Script Hook preferences, and add it for the value for Add File or URL. [snip script] I really did not do much here, except take the suggestion made about remote URLs in an e-mail sometime yesterday and add it to the modified script that C. posted on the wiki. (That is, I copied the lines given in yesterday's e-mail [for the if statement beginning with else if theField is Remote URL... ] and pasted them in what seemed an appropriate spot. This is just an aggregation of different pieces of script floating on the wiki, mailing list, etc.) But this is a more complete/alternate version of the script, if you want both local and remote files to be added to the entry as fields for Bibtex to use in creating a bibliography. End semi-documentation Hope this helps someone else! Best, -Nathan -- Nathan A. Paxton Ph.D. Candidate Dept. of Government, Harvard University Resident Tutor John Winthrop House, Harvard University napaxton AT fas DOT harvard DOT edu http://www.fas.harvard.edu/~napaxton = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = == If every professor who backed a lunatic politician were to be sacked, half the interesting minds in academia would be lost. - The Economist, 5 Jan 2002 A morning without coffee is like something without something else. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = == On 5 Dec 2008, at 5:52 AM, Christiaan Hofman wrote: Something is wrong with the AppleScript when it's run as a script hook. It's really a long standing, IMHO serious, bug in AppleScript's handling of files. Apparently Apple has made the problem worse rather than fix it since the last time I tested this script. I have posted a fixed version of the script hook on the Wiki that doesn't use Finder's buggy scripting support. It also includes conversion of remote URLs, though you have to turn that on using a property at the beginning of the script. Christiaan -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/___ Bibdesk-users mailing list Bibdesk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-users -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/___ Bibdesk-users mailing list Bibdesk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-users
[Bibdesk-users] URLs in formatted citations, deprecated fields, and such
Hi all, I've done some searching, but I can't figure out what search terms would work best to narrow all of this down. Here's the problem. I do most of my citation work with natbib, using a chicago bst file. The bst is set up to include URLs of articles, periodicals, and so forth, where they exist, in line with Chicago's style on this sort of thing. So, for example, the front page article of today's New York Times should look like (in Chicago author-date in- text style): Vlasic, Bill. 2008. U.A.W. Makes Concessions to Help Automakers. New York Times, 3 December 2008. http://www.nytimes.com/2008/12/04/business/04auto.html (accessed 3 December 2008). But with the deprecation of the URL field in the most recent BibDesk versions, I no longer get the URL and access information. How can I restore the stylistically correct behavior? Best, -Nathan -- Nathan A. Paxton Ph.D. Candidate Dept. of Government, Harvard University Resident Tutor John Winthrop House, Harvard University napaxton AT fas DOT harvard DOT edu http://www.fas.harvard.edu/~napaxton = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = If every professor who backed a lunatic politician were to be sacked, half the interesting minds in academia would be lost. - The Economist, 5 Jan 2002 A morning without coffee is like something without something else. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = - 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=100url=/___ Bibdesk-users mailing list Bibdesk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Re: [Bibdesk-users] URLs in formatted citations, deprecated fields, and such
Thanks! I'm not an Applescript genius, so what are teh names of the scripts? Will these make sure than I don't run into this problem each time I update BD? Best, -Nathan -- Nathan A. Paxton Ph.D. Candidate Dept. of Government, Harvard University Resident Tutor John Winthrop House, Harvard University napaxton AT fas DOT harvard DOT edu http://www.fas.harvard.edu/~napaxton = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = When you have to stay eight years away from California, you live in a perpetual state of homesickness. - Ronald Reagan The most courageous act is still to think for yourself. Aloud. -Coco Chanel = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = On 4 Dec 2008, at 11:25 AM, Christiaan Hofman wrote: You can duplicate the linked files/URLs to fields. Best to do that using AppleScript. I recently posted an applescript on this list that duplicates the linked files and URLs to fields like Local-Url and Url. You can also automate the task (for newly added linked files and URLs) using a script hook. A sample script for this is linked on the Wiki. Christiaan On 4 Dec 2008, at 5:16 PM, Nathan Paxton wrote: Hi all, I've done some searching, but I can't figure out what search terms would work best to narrow all of this down. Here's the problem. I do most of my citation work with natbib, using a chicago bst file. The bst is set up to include URLs of articles, periodicals, and so forth, where they exist, in line with Chicago's style on this sort of thing. So, for example, the front page article of today's New York Times should look like (in Chicago author-date in-text style): Vlasic, Bill. 2008. U.A.W. Makes Concessions to Help Automakers. New York Times, 3 December 2008. http://www.nytimes.com/2008/12/04/business/04auto.html (accessed 3 December 2008). But with the deprecation of the URL field in the most recent BibDesk versions, I no longer get the URL and access information. How can I restore the stylistically correct behavior? Best, -Nathan -- Nathan A. Paxton Ph.D. Candidate Dept. of Government, Harvard University Resident Tutor John Winthrop House, Harvard University napaxton AT fas DOT harvard DOT edu http://www.fas.harvard.edu/~napaxton = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = If every professor who backed a lunatic politician were to be sacked, half the interesting minds in academia would be lost. - The Economist, 5 Jan 2002 A morning without coffee is like something without something else. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = - 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=100url=/___ Bibdesk-users mailing list Bibdesk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-users - 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=100url=/___ Bibdesk-users mailing list Bibdesk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-users - 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=100url=/___ Bibdesk-users mailing list Bibdesk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Re: [Bibdesk-users] URLs in formatted citations, deprecated fields, and such
Well, just look in the archive of this list and on the Wiki. It should be pretty obvious. As for keeping these fields, make sure you use the correct settings in the Default Fields preferences for automatic conversions (in particular don't automatically delete URL fields). Updating BD does not make a difference, as you're not changing anything in the BD bundle. Christiaan On 4 Dec 2008, at 5:30 PM, Nathan Paxton wrote: Thanks! I'm not an Applescript genius, so what are teh names of the scripts? Will these make sure than I don't run into this problem each time I update BD? Best, -Nathan -- Nathan A. Paxton Ph.D. Candidate Dept. of Government, Harvard University Resident Tutor John Winthrop House, Harvard University napaxton AT fas DOT harvard DOT edu http://www.fas.harvard.edu/~napaxton = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = == When you have to stay eight years away from California, you live in a perpetual state of homesickness. - Ronald Reagan The most courageous act is still to think for yourself. Aloud. -Coco Chanel = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = == On 4 Dec 2008, at 11:25 AM, Christiaan Hofman wrote: You can duplicate the linked files/URLs to fields. Best to do that using AppleScript. I recently posted an applescript on this list that duplicates the linked files and URLs to fields like Local-Url and Url. You can also automate the task (for newly added linked files and URLs) using a script hook. A sample script for this is linked on the Wiki. Christiaan On 4 Dec 2008, at 5:16 PM, Nathan Paxton wrote: Hi all, I've done some searching, but I can't figure out what search terms would work best to narrow all of this down. Here's the problem. I do most of my citation work with natbib, using a chicago bst file. The bst is set up to include URLs of articles, periodicals, and so forth, where they exist, in line with Chicago's style on this sort of thing. So, for example, the front page article of today's New York Times should look like (in Chicago author-date in-text style): Vlasic, Bill. 2008. U.A.W. Makes Concessions to Help Automakers. New York Times, 3 December 2008. http://www.nytimes.com/2008/12/04/business/04auto.html (accessed 3 December 2008). But with the deprecation of the URL field in the most recent BibDesk versions, I no longer get the URL and access information. How can I restore the stylistically correct behavior? Best, -Nathan -- Nathan A. Paxton Ph.D. Candidate Dept. of Government, Harvard University Resident Tutor John Winthrop House, Harvard University napaxton AT fas DOT harvard DOT edu http://www.fas.harvard.edu/~napaxton = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = If every professor who backed a lunatic politician were to be sacked, half the interesting minds in academia would be lost. - The Economist, 5 Jan 2002 A morning without coffee is like something without something else. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = - 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=100url=/___ Bibdesk-users mailing list Bibdesk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-users - 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=100url=/___ Bibdesk-users mailing list Bibdesk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-users - 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
Re: [Bibdesk-users] URLs in formatted citations, deprecated fields, and such
Replace (get linked URL) with (get linked URL i) Christiaan On 4 Dec 2008, at 6:46 PM, Nathan Paxton wrote: Following the discussion of the script in question, I changed theFile to (theFile as file). The new error message I get is: BibDesk got an error: Can’t make linked URL into type text. Best, -Nathan -- Nathan A. Paxton Ph.D. Candidate Dept. of Government, Harvard University Resident Tutor John Winthrop House, Harvard University napaxton AT fas DOT harvard DOT edu http://www.fas.harvard.edu/~napaxton = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = == If every professor who backed a lunatic politician were to be sacked, half the interesting minds in academia would be lost. - The Economist, 5 Jan 2002 A morning without coffee is like something without something else. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = == On 4 Dec 2008, at 12:20 PM, Nathan Paxton wrote: Okey-dokey, I found the file posted recently, with a script called LinkedFilesToFields.scpt. I added that to the scripts menu. I tried to run it. And the following happened. AppleScript reported the following error: Finder got an error: Can’t get container of file Macintosh HD:Users:nathanpaxton:Library:texmf:bibtex:bib:disslibrary.bib. As for keeping these fields, make sure you use the correct settings in the Default Fields preferences for automatic conversions (in particular don't automatically delete URL fields). Updating BD does not make a difference, as you're not changing anything in the BD bundle. I must have allowed an automatic deletion. I don't know any AppleScript at all, and I am sorry for that. I only really want to have two things happen here: 1. I'd like there to be a URL field, so that my .bst can pick it up and work correctly (as it did before). How can I back convert my .bib file? 2. Will I be able to continue having URL/local file fields in my .bib file in the future? Perhaps we could add a small warning to the conversion process, indicating that allowing the original fields to be deleted will change the behavior of bibliographic output in one's documents? I read the fields are being deprecated language and that made me think that they were not necessary anymore Thanks, Christiaan, in advance for your help. Best, -Nathan -- Nathan A. Paxton Ph.D. Candidate Dept. of Government, Harvard University Resident Tutor John Winthrop House, Harvard University napaxton AT fas DOT harvard DOT edu http://www.fas.harvard.edu/~napaxton = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = If every professor who backed a lunatic politician were to be sacked, half the interesting minds in academia would be lost. - The Economist, 5 Jan 2002 A morning without coffee is like something without something else. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = On 4 Dec 2008, at 11:56 AM, Christiaan Hofman wrote: Well, just look in the archive of this list and on the Wiki. It should be pretty obvious. As for keeping these fields, make sure you use the correct settings in the Default Fields preferences for automatic conversions (in particular don't automatically delete URL fields). Updating BD does not make a difference, as you're not changing anything in the BD bundle. Christiaan On 4 Dec 2008, at 5:30 PM, Nathan Paxton wrote: Thanks! I'm not an Applescript genius, so what are teh names of the scripts? Will these make sure than I don't run into this problem each time I update BD? Best, -Nathan -- Nathan A. Paxton Ph.D. Candidate Dept. of Government, Harvard University Resident Tutor John Winthrop House, Harvard University napaxton AT fas DOT harvard DOT edu http://www.fas.harvard.edu/~napaxton = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = === When you have to stay eight years away from California, you live in a perpetual state of homesickness. - Ronald Reagan The most courageous act is still to think for yourself. Aloud. -Coco Chanel = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = === On 4 Dec 2008, at 11:25 AM, Christiaan Hofman wrote: You can duplicate the linked files/URLs to fields. Best to do that using
Re: [Bibdesk-users] URLs in formatted citations, deprecated fields, and such
Ah, *that's* what the script hooks pref menu is for! I've never understood that. So I simply go to Script Hooks in the preferences, select Add to File or URL (and Did Auto File), and then select LinkedFilesToFields.scpt for the script file? And this will then automagically take the url/ location of the included files (over in the preview sidebar) and put it in URL/file/DOI fields that the script has just created? I would wager that there are other non-beginner users out there who don't quite understand what the script hooks preferences and all are about. How could the BD project go about explaining the script hooks preferences panel, what the hooks are, and so forth? I know there's basic documentation on the wiki, but I can't say that I quite understand what's going on based on that. I'd be happy to help, but since I'm only fuzzily understanding this myself, I'm not good to lead/ start a beefing up of the documentation. Best, -Nathan -- Nathan A. Paxton Ph.D. Candidate Dept. of Government, Harvard University Resident Tutor John Winthrop House, Harvard University napaxton AT fas DOT harvard DOT edu http://www.fas.harvard.edu/~napaxton = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = When you have to stay eight years away from California, you live in a perpetual state of homesickness. - Ronald Reagan The most courageous act is still to think for yourself. Aloud. -Coco Chanel = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = On 4 Dec 2008, at 1:19 PM, Christiaan Hofman wrote: On 4 Dec 2008, at 7:12 PM, Nathan Paxton wrote: On 4 Dec 2008, at 12:50 PM, Christiaan Hofman wrote: Use the script after fixing it. The fix was described in the thread where you found it. Open the script in Script Editor, and replace theFile with (theFile as alias) inside the containerPath routine. Done. Also made the changes suggested in the following e-mail: Replace (get linked URL) with (get linked URL i) Christiaan 2. Will I be able to continue having URL/local file fields in my .bib file in the future? Use the script hook from the Wiki. I'm really sorry. I don't understand how scripts, script hooks, and all this works. I guess that all I want to do is be able to have bibliographic entries that follow the Chicago format, and that requires the inclusion of URLs and access dates. (See the next comment also.) I don't know how to do AppleScript, and I don't have time this month to learn, unfortunately. You don't need to learn AppleScript to do this, as the script is already available form the Wiki. Just add it in the Script Hook preferences for Add File and/or Did Auto File. It will automatically be invoked when the corresponding event happens. Christiaan Perhaps we could add a small warning to the conversion process, indicating that allowing the original fields to be deleted will change the behavior of bibliographic output in one's documents? I read the fields are being deprecated language and that made me think that they were not necessary anymore That just depends. Be aware that these are not even standard bibtex fields. *Sigh* So how are these being done now? (I'm using a standard .bst file, just modified with the urlbst macro package from CTAN.) I guess I'm frustrated by doing what I thought had been the right way, only to find out that I was either led astray at some point, or things have changed. What's the way that people get URLs and such into bibliographic references? Any help here would be appreciated; I like tex'ing, but sometimes these changes are confusing. Can anyone suggest a good working chicago-style bst, preferably for natbib? Thanks. Best, -Nathan - 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=100url=/___ Bibdesk-users mailing list Bibdesk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-users - 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=100url=/___
Re: [Bibdesk-users] URLs in formatted citations, deprecated fields, and such
On 4 Dec 2008, at 11:12 PM, Nathan Paxton wrote: Ah, *that's* what the script hooks pref menu is for! I've never understood that. So I simply go to Script Hooks in the preferences, select Add to File or URL (and Did Auto File), and then select LinkedFilesToFields.scpt for the script file? And this will then automagically take the url/location of the included files (over in the preview sidebar) and put it in URL/file/DOI fields that the script has just created? No. As I said earlier, a script hook is a script that's invoked when a particular action is executed. So for the Add File or URL script hook, it's invoked when you link a file or a URL (in the sidebar). The script hook on the Wiki takes the first linked file, and sets the Local-Url field to the (relative) path of that file. I would wager that there are other non-beginner users out there who don't quite understand what the script hooks preferences and all are about. How could the BD project go about explaining the script hooks preferences panel, what the hooks are, and so forth? I know there's basic documentation on the wiki, but I can't say that I quite understand what's going on based on that. I'd be happy to help, but since I'm only fuzzily understanding this myself, I'm not good to lead/start a beefing up of the documentation. Script hooks are an advanced feature. BTW, it was specifically added as a result of user requests. We have said many times on the list: we developers are not the ones who should write the Help, because for us everything is trivial. It should be written by users. So far not many users have responded. Christiaan Best, -Nathan -- Nathan A. Paxton Ph.D. Candidate Dept. of Government, Harvard University Resident Tutor John Winthrop House, Harvard University napaxton AT fas DOT harvard DOT edu http://www.fas.harvard.edu/~napaxton = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = == When you have to stay eight years away from California, you live in a perpetual state of homesickness. - Ronald Reagan The most courageous act is still to think for yourself. Aloud. -Coco Chanel = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = == On 4 Dec 2008, at 1:19 PM, Christiaan Hofman wrote: On 4 Dec 2008, at 7:12 PM, Nathan Paxton wrote: On 4 Dec 2008, at 12:50 PM, Christiaan Hofman wrote: Use the script after fixing it. The fix was described in the thread where you found it. Open the script in Script Editor, and replace theFile with (theFile as alias) inside the containerPath routine. Done. Also made the changes suggested in the following e-mail: Replace (get linked URL) with (get linked URL i) Christiaan 2. Will I be able to continue having URL/local file fields in my .bib file in the future? Use the script hook from the Wiki. I'm really sorry. I don't understand how scripts, script hooks, and all this works. I guess that all I want to do is be able to have bibliographic entries that follow the Chicago format, and that requires the inclusion of URLs and access dates. (See the next comment also.) I don't know how to do AppleScript, and I don't have time this month to learn, unfortunately. You don't need to learn AppleScript to do this, as the script is already available form the Wiki. Just add it in the Script Hook preferences for Add File and/or Did Auto File. It will automatically be invoked when the corresponding event happens. Christiaan Perhaps we could add a small warning to the conversion process, indicating that allowing the original fields to be deleted will change the behavior of bibliographic output in one's documents? I read the fields are being deprecated language and that made me think that they were not necessary anymore That just depends. Be aware that these are not even standard bibtex fields. *Sigh* So how are these being done now? (I'm using a standard .bst file, just modified with the urlbst macro package from CTAN.) I guess I'm frustrated by doing what I thought had been the right way, only to find out that I was either led astray at some point, or things have changed. What's the way that people get URLs and such into bibliographic references? Any help here would be appreciated; I like tex'ing, but sometimes these changes are confusing. Can anyone suggest a good working chicago-style bst, preferably for natbib? Thanks. Best, -Nathan - 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
Re: [Bibdesk-users] URLs in formatted citations, deprecated fields, and such
On 04.12.2008, at 22:12, Nathan Paxton wrote: Ah, *that's* what the script hooks pref menu is for! I've never understood that. So I simply go to Script Hooks in the preferences, select Add to File or URL (and Did Auto File), and then select LinkedFilesToFields.scpt for the script file? And this will then automagically take the url/location of the included files (over in the preview sidebar) and put it in URL/file/DOI fields that the script has just created? I would wager that there are other non-beginner users out there who don't quite understand what the script hooks preferences and all are about. How could the BD project go about explaining the script hooks preferences panel, what the hooks are, and so forth? I know there's basic documentation on the wiki, but I can't say that I quite understand what's going on based on that. I'd be happy to help, but since I'm only fuzzily understanding this myself, I'm not good to lead/start a beefing up of the documentation. Best, -Nathan -- Nathan A. Paxton Ph.D. Candidate Dept. of Government, Harvard University Resident Tutor John Winthrop House, Harvard University napaxton AT fas DOT harvard DOT edu http://www.fas.harvard.edu/~napaxton Hi Nathan, I might be too basic here but maybe it helps clarify things. You should be aware of the difference between a script and a script hook. An applescript is a small script file that is being kept in the respective BibDeks scrip folder and that can be invoked via the script menu in BD's menu bar. This will run the specific script and perform the relevant actions. A script hook is a way of automatically invoking such a script whenever a specific action is performed. Nevertheless, the script will be basically the same type of file, just the way it is being invoked is different: manually in the first case, automatically in the latter. Applescript is a tricky thing to get into: I myself have made several attempts and ended them in frustration each time. Still, the best approach seems to be to try to understand a simple script and then try to think about ways it would work using a script hook. Sorry, if this was all clear to you. Alex -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Bibdesk-users mailing list Bibdesk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Re: [Bibdesk-users] URLs in formatted citations, deprecated fields, and such
On 5 Dec 2008, at 1:28 AM, Nathan Paxton wrote: Alex (et al.), That was exactly what I needed. I had sort of inferred that something like that might be the case. And Christiaan's clarification that the hook only gets invoked (in this case) upon some action helps also. So, I'd be happy to write some clarification of what each of the hooks do, after I figure that out. Now, I've added the LinkedFilesToFields script to the Add File or URL hook. My understanding is that when I drop a webpage or PDF document into the entry window sidebar, I should get a Url or Local- Url field generated, with the path to the webpage or document in it. Is that it? Because the Url field generation only occurs when I manually run the script on the entry, not automatically upon dropping a weblink onto the sidebar. The script hook on the Wiki only handles linked files, not linked URLs. It's not too hard though to modify the script to also handle remote URLs. Basically, you should copy the if block for Local File, and add a else if block to it for Remote URL. Something like this: ... else if theField is Remote URL then repeat with thePub in thePubs tell thePub if ((count of (get linked URLs)) 0) then set theURL to linked URL 1 set the value of field Url to theURL end if end tell end repeat end if Also note that the script hook only copies the first linked file, while the script from the list copies all linked files or URLs (if there are more than one). Christiaan Thanks for all the help, all. Best, -Nathan -- Nathan A. Paxton Ph.D. Candidate Dept. of Government, Harvard University Resident Tutor John Winthrop House, Harvard University napaxton AT fas DOT harvard DOT edu http://www.fas.harvard.edu/~napaxton = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = == When you have to stay eight years away from California, you live in a perpetual state of homesickness. - Ronald Reagan The most courageous act is still to think for yourself. Aloud. -Coco Chanel = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = == On 4 Dec 2008, at 7:06 PM, Alex Hamann wrote: On 04.12.2008, at 22:12, Nathan Paxton wrote: Ah, *that's* what the script hooks pref menu is for! I've never understood that. So I simply go to Script Hooks in the preferences, select Add to File or URL (and Did Auto File), and then select LinkedFilesToFields.scpt for the script file? And this will then automagically take the url/location of the included files (over in the preview sidebar) and put it in URL/file/DOI fields that the script has just created? I would wager that there are other non-beginner users out there who don't quite understand what the script hooks preferences and all are about. How could the BD project go about explaining the script hooks preferences panel, what the hooks are, and so forth? I know there's basic documentation on the wiki, but I can't say that I quite understand what's going on based on that. I'd be happy to help, but since I'm only fuzzily understanding this myself, I'm not good to lead/start a beefing up of the documentation. Best, -Nathan -- Nathan A. Paxton Ph.D. Candidate Dept. of Government, Harvard University Resident Tutor John Winthrop House, Harvard University napaxton AT fas DOT harvard DOT edu http://www.fas.harvard.edu/~napaxton Hi Nathan, I might be too basic here but maybe it helps clarify things. You should be aware of the difference between a script and a script hook. An applescript is a small script file that is being kept in the respective BibDeks scrip folder and that can be invoked via the script menu in BD's menu bar. This will run the specific script and perform the relevant actions. A script hook is a way of automatically invoking such a script whenever a specific action is performed. Nevertheless, the script will be basically the same type of file, just the way it is being invoked is different: manually in the first case, automatically in the latter. Applescript is a tricky thing to get into: I myself have made several attempts and ended them in frustration each time. Still, the best approach seems to be to try to understand a simple script and then try to think about ways it would work using a script hook. Sorry, if this was all clear to you. Alex -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at