Custom Search Engine for ADS BibTeX

by saurav on June 7, 2011

Custom ADS search bar obviates the need to navigate and click through ADS's website.

We have previously talked about how to use Quicksilver to do custom ADS searches on Macs, and the Alfred version is pretty slick as well. However, such custom searches can also be done from straight from the web browser, independent of the OS you are using. Benoit Thiell, a developer at ADS, has sent along a tip on how to get the bibtex version of an article from ADS on Firefox and Chrome (I have added the same for Safari). This allows you to search ADS directly from the search box in yoor browser instead of having to navigate via ADS’s website. It saves a lot of clicking. Here are Benoit’s tips:

  • Firefox: You need a plugin to create a custom search engine in Firefox.  Benoit has written a plugin for the purpose. Download and click on “ADS Bibtex” to install the custom search engine for the ADS bibtex output.  Accept the installation of the search plugin, and it is now available to you in the search bar in the top right corner of your browser as the “ADS bibtex” search engine. Select it, enter a bibcode, and peruse the Bibtex version of the article.
  • Chrome: You can very easily set up a custom search engine in Chrome, without the need for a plugin. Go to chrome://settings/searchEngines. Scroll to the bottom of the page and start adding a new search engine. Configure as follows:
  • Add a new search engine: ADS bibtex
    Keyword: bibtex
    URL: http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=%s&data_type=BIBTEX

    You’re done. In order to get to the Bibtex, type in your address bar ”bibtex”, then space and finally the bibcode of the article.

    Setting up a custom search engine in Safari to query ADS. The same can be done for Firefox and Chrome and/or to retrieve bibtex version of the article.

  • Safari: To set up a custom search engine in Safari, you will need an add-on. I recommend Glims; Inquisitor should work but SafariStand will not, as far as I know. (The add-ons will provide many other features like full screen, auto-complete, organizing download folders to Safari.) Then access the Glims preferences located in Safari Preferences  and configure as shown below.
  •  

    Note that the Query URL is customized for searching by author; to directly access the bibtex (as shown above for Chrome), use

    http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=%s&data_type=BIBTEX

 

One shortcoming of such custom search engines for ADS is that you cannot specify multiple search fields. Fortunately, Daniel Foreman-Mackey has written a Javascript to parse the ‘author’ and ‘year’ including simple logic. Read Dan’s README for more details. Use the following URL while setting up the custom search engine to make use of Dan’s Javascript:

http://dfm.github.com/ads_search?ads={query}

Thanks to Benoit for sending along this tip!

{ 1 comment… read it below or add one }

1 Lee Spitler July 15, 2011 at 12:38 am

Here are some command-line python scripts to access simple ADS, NED and google queries:

http://astronomy.swin.edu.au/~lspitler/python/

Reply

Leave a Comment

Previous post:

Next post: