Hi everybody,
for anyone using The Smithsonian/NASA Astrophysics Data System ADS
(http://adsabs.harvard.edu/). An apple script for BibDesk, which
takes the Adsurl field of an entry copies that to the URL field and
retrieves the abstract for that article from ADS. Get the script
either below or at
http://astro.uni-tuebingen.de/~djkuster/phi/CODE/AppleScripts/
ADSabstract.scpt
Hope you find this useful.
Cheers
Daniel
-- Applescript for BibDesk
-- ADS script to get abstract from Adsurl field
-- Daniel-Jens Kusterer, February 2007
tell application "BibDesk"
set theDoc to document 1
--set theName to the name of selection -- usually the publication's
title, if this is an editor window
tell theDoc
set theSel to selection
set thePub to item 1 of theSel
get value of field "Adsurl" of thePub
set pasteItem to result as string
set urlName to pasteItem
tell thePub
set the value of the field "Url" of thePub to urlName
end tell
try
do shell script "curl \"" & urlName & "\""
set theAbstract to the result
if theAbstract = "" then error
end try
set savedTextItemDelimiters to AppleScript's text item
delimiters
try
set AppleScript's text item delimiters to
{"Abstract</h3>"}
get last text item of theAbstract
set theAbstract to the result
set AppleScript's text item delimiters to {"<hr>"}
get first text item of theAbstract
set theAbstract to the result
set AppleScript's text item delimiters to
savedTextItemDelimiters
end try
set abstract of thePub to theAbstract
end tell
end tell
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bibdesk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users