Update bibtex entries from pubmed

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Update bibtex entries from pubmed

jefferis
Dear BibDesk Users and Developers,

I populate my BibDesk library with a perl script that parses downloaded PDFs
to find DOIs (or other info) and renames the files to their PubMed ID; drag
and drop then generates a full bibtex entry with a link to the autofiled
PDF.

However I often import publications into BibDesk while they are still in
press.  This results in an entry that may not have all the citation
information.  Has anyone found a way to update selected entries from PubMed?
If not would you have any suggestions as to the best way to achieve this?

Many thanks,

Greg.

PS one related question.  What would be the applescript equivalent of
dragging and dropping a PDF into the main document window?  I would like to
add an "osascript" command to the end of my perl script to add the PMID
named PDF to BibDesk.  "Open" is not the right command since it tries to
open as library.

--
Gregory Jefferis, PhD                      [hidden email]
Division of Neurobiology                   LMB Lab:    +44 (0)1223 252943
MRC Laboratory of Molecular Biology,       LMB Office: +44 (0)1223 252944
Hills Road,                                LMB Fax:    +44 (0)1223 402310
Cambridge, CB2 0QH, UK.                    Voicemail:  +44 (0)1223 339899

http://www2.mrc-lmb.cam.ac.uk/NB/jefferis_g
http://www.neuroscience.cam.ac.uk/directory/profile.php?gsxej2
http://flybrain.stanford.edu




------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Reply | Threaded
Open this post in threaded view
|

Re: Update bibtex entries from pubmed

Miguel Ortiz Lombardía
Hi Greg,

Not sure to have understood what you want, but I try. Publications in  
press include a 'Pst' field with the value 'aheadofprint'. You can  
move these references to a dedicated BibDesk Library and then write a  
script to check from time to time if the corresponding entries get  
updated.

I'm interested about the way you look for DOIs in pdf files. I have a  
pyhton script which tries to do that, but I haven't come up with a  
general rule to detect the DOIs: different journals use different  
syntaxes. Did you solve this problem?

Best regards,


Miguel

Le 5 déc. 08 à 18:15, Gregory Jefferis a écrit :

> Dear BibDesk Users and Developers,
>
> I populate my BibDesk library with a perl script that parses  
> downloaded PDFs
> to find DOIs (or other info) and renames the files to their PubMed  
> ID; drag
> and drop then generates a full bibtex entry with a link to the  
> autofiled
> PDF.
>
> However I often import publications into BibDesk while they are  
> still in
> press.  This results in an entry that may not have all the citation
> information.  Has anyone found a way to update selected entries from  
> PubMed?
> If not would you have any suggestions as to the best way to achieve  
> this?
>
> Many thanks,
>
> Greg.
>
> PS one related question.  What would be the applescript equivalent of
> dragging and dropping a PDF into the main document window?  I would  
> like to
> add an "osascript" command to the end of my perl script to add the  
> PMID
> named PDF to BibDesk.  "Open" is not the right command since it  
> tries to
> open as library.
>
> --
> Gregory Jefferis, PhD                      [hidden email]
> Division of Neurobiology                   LMB Lab:    +44 (0)1223  
> 252943
> MRC Laboratory of Molecular Biology,       LMB Office: +44 (0)1223  
> 252944
> Hills Road,                                LMB Fax:    +44 (0)1223  
> 402310
> Cambridge, CB2 0QH, UK.                    Voicemail:  +44 (0)1223  
> 339899
>
> http://www2.mrc-lmb.cam.ac.uk/NB/jefferis_g
> http://www.neuroscience.cam.ac.uk/directory/profile.php?gsxej2
> http://flybrain.stanford.edu
>
>
>
>
> ------------------------------------------------------------------------------
> 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
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/bibdesk-users
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>

--
Miguel Ortiz Lombardía
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!                NEW ADDRESS                 !!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Architecture et Fonction des Macromolécules Biologiques
UMR6098, CNRS, Université Aix-Marseille I & II
Case 932
163 Avenue de Luminy
13288 Marseille cedex 9
France
Tel : +33(0) 491 82 55 93
Fax: +33(0) 491 26 67 20
e-mail: [hidden email]
Web: http://www.pangea.org/mol/spip.php?rubrique2


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Reply | Threaded
Open this post in threaded view
|

Re: Update bibtex entries from pubmed

Christiaan Hofman
In reply to this post by jefferis

On 5 Dec 2008, at 6:15 PM, Gregory Jefferis wrote:

> Dear BibDesk Users and Developers,
>
> I populate my BibDesk library with a perl script that parses  
> downloaded PDFs
> to find DOIs (or other info) and renames the files to their PubMed  
> ID; drag
> and drop then generates a full bibtex entry with a link to the  
> autofiled
> PDF.
>
> However I often import publications into BibDesk while they are  
> still in
> press.  This results in an entry that may not have all the citation
> information.  Has anyone found a way to update selected entries from  
> PubMed?
> If not would you have any suggestions as to the best way to achieve  
> this?
>
> Many thanks,
>
> Greg.
>

If you've automatic auto-filing turned on, than auto-filing of  
imported items will wait till you've filled in all the necessary  
details, though this only works as long as the document stays open.

Otherwise you can always manually auto-file after you filled in the  
details. The publication window has several menu items for this (in  
the contextual menu for the file view, and in the gear menu at the  
bottom), and you can also use the item in the main menu with shortcut  
Cmd-K.

> PS one related question.  What would be the applescript equivalent of
> dragging and dropping a PDF into the main document window?  I would  
> like to
> add an "osascript" command to the end of my perl script to add the  
> PMID
> named PDF to BibDesk.  "Open" is not the right command since it  
> tries to
> open as library.
>

If you have a bibtex string for the items you can do something like  
this:

set the bibTeXString to (*fill in details here*)
tell application "BibDesk"
        tell document 1
                make new publication with properties {bibTeX string:theBibteXString}  
at beginning of publications
        end tell
end tell

You can also make a new pub and set individual properties afterwards,  
something like:

set thePub to make new publication at beginning of publications
tell thePub
        set cite key to theCiteKey
        set value of field "Title" to theTitle
        ...
        add theFile to end of linked files
        ...
end tell

Have a look at my arXiv import scripts linked on the Wiki for  
inspiration.

There's no real equivalent way to import from other supported file  
formats. It may be worthwhile to add an "import" command for that.

Christiaan

> --
> Gregory Jefferis, PhD                      [hidden email]
> Division of Neurobiology                   LMB Lab:    +44 (0)1223  
> 252943
> MRC Laboratory of Molecular Biology,       LMB Office: +44 (0)1223  
> 252944
> Hills Road,                                LMB Fax:    +44 (0)1223  
> 402310
> Cambridge, CB2 0QH, UK.                    Voicemail:  +44 (0)1223  
> 339899
>
> http://www2.mrc-lmb.cam.ac.uk/NB/jefferis_g
> http://www.neuroscience.cam.ac.uk/directory/profile.php?gsxej2
> http://flybrain.stanford.edu


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Reply | Threaded
Open this post in threaded view
|

Re: Update bibtex entries from pubmed

Maxwell, Adam R
In reply to this post by jefferis
On 12/05/08 09:15, "Gregory Jefferis" <[hidden email]> wrote:

> Dear BibDesk Users and Developers,
>
> I populate my BibDesk library with a perl script that parses downloaded PDFs
> to find DOIs (or other info) and renames the files to their PubMed ID; drag
> and drop then generates a full bibtex entry with a link to the autofiled
> PDF.

That is a cool usage of the PubMed feature!  I wish I could use PubMed
myself.

> However I often import publications into BibDesk while they are still in
> press.  This results in an entry that may not have all the citation
> information.  Has anyone found a way to update selected entries from PubMed?
> If not would you have any suggestions as to the best way to achieve this?

The only way I can think of is to download the citation info yourself via
Perl or other scripting language, and then tell BibDesk to update individual
fields via osascript.  I actually used NCBI's Perl scripts as a guide to add
PubMed support to BibDesk:

http://www.ncbi.nlm.nih.gov/entrez/query/static/eutils_help.html#Demonstrati
onPrograms

BibDesk uses rettype=medline to get results.  You'd have to parse that
yourself, unfortunately.
 
> PS one related question.  What would be the applescript equivalent of
> dragging and dropping a PDF into the main document window?  I would like to
> add an "osascript" command to the end of my perl script to add the PMID
> named PDF to BibDesk.  "Open" is not the right command since it tries to
> open as library.

I don't think there's any way to do this.  In particular, the PubMed lookup
based on filename is only triggered when you drop a file on the main window
to create a new entry.  Sorry about that.

--
Adam


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Reply | Threaded
Open this post in threaded view
|

Re: Update bibtex entries from pubmed

Christiaan Hofman

On 5 Dec 2008, at 7:24 PM, Maxwell, Adam R wrote:

> On 12/05/08 09:15, "Gregory Jefferis" <[hidden email]> wrote:
>
>> Dear BibDesk Users and Developers,
>>
>> I populate my BibDesk library with a perl script that parses  
>> downloaded PDFs
>> to find DOIs (or other info) and renames the files to their PubMed  
>> ID; drag
>> and drop then generates a full bibtex entry with a link to the  
>> autofiled
>> PDF.
>
> That is a cool usage of the PubMed feature!  I wish I could use PubMed
> myself.
>
>> However I often import publications into BibDesk while they are  
>> still in
>> press.  This results in an entry that may not have all the citation
>> information.  Has anyone found a way to update selected entries  
>> from PubMed?
>> If not would you have any suggestions as to the best way to achieve  
>> this?
>
> The only way I can think of is to download the citation info  
> yourself via
> Perl or other scripting language, and then tell BibDesk to update  
> individual
> fields via osascript.  I actually used NCBI's Perl scripts as a  
> guide to add
> PubMed support to BibDesk:
>
> http://www.ncbi.nlm.nih.gov/entrez/query/static/eutils_help.html#Demonstrati
> onPrograms
>
> BibDesk uses rettype=medline to get results.  You'd have to parse that
> yourself, unfortunately.
>

The last part can now be a bit easier. I just added an "import"  
applescript command that allows you to add items from a text format BD  
can parse, such as pubmed. It should be available in the next nightly.  
The syntax is

tell document 1
        import from theStringOrFile
end tell

theStringOrFile is either some string representation BD understands,  
or a file object for a file containing such a string. The command  
returns the publications that were added.

Christiaan

>> PS one related question.  What would be the applescript equivalent of
>> dragging and dropping a PDF into the main document window?  I would  
>> like to
>> add an "osascript" command to the end of my perl script to add the  
>> PMID
>> named PDF to BibDesk.  "Open" is not the right command since it  
>> tries to
>> open as library.
>
> I don't think there's any way to do this.  In particular, the PubMed  
> lookup
> based on filename is only triggered when you drop a file on the main  
> window
> to create a new entry.  Sorry about that.
>
> --
> Adam



------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users