1 ;;; wos.el --- WEb of Science functions -*- lexical-binding: t; -*-
3 ;; Copyright (C) 2015 John Kitchin
5 ;; Author: John Kitchin <jkitchin@andrew.cmu.edu>
8 ;; This program is free software; you can redistribute it and/or modify
9 ;; it under the terms of the GNU General Public License as published by
10 ;; the Free Software Foundation, either version 3 of the License, or
11 ;; (at your option) any later version.
13 ;; This program is distributed in the hope that it will be useful,
14 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;; GNU General Public License for more details.
18 ;; You should have received a copy of the GNU General Public License
19 ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
23 ;; Adds a new org-mode link for a search in Web of Science.
31 (format "http://gateway.webofknowledge.com/gateway/Gateway.cgi?topic=%s&GWVersion=2&SrcApp=WEB&SrcAuth=HSB&DestApp=UA&DestLinkType=GeneralSearchSummary"
33 (split-string path)))))
34 ;; formatting function. Assume html
35 (lambda (link desc format)
36 (format "<a href=\"%s\">%s</a>"
37 (format "http://gateway.webofknowledge.com/gateway/Gateway.cgi?topic=%s&GWVersion=2&SrcApp=WEB&SrcAuth=HSB&DestApp=UA&DestLinkType=GeneralSearchSummary"
40 (format "wos:%s" link)
45 "Open the word at point or selection in Web of Science."
46 ;; the url was derived from this page: http://wokinfo.com/webtools/searchbox/
49 (format "http://gateway.webofknowledge.com/gateway/Gateway.cgi?topic=%s&GWVersion=2&SrcApp=WEB&SrcAuth=HSB&DestApp=UA&DestLinkType=GeneralSearchSummary"
51 (mapconcat 'identity (split-string
52 (buffer-substring (region-beginning)
54 (thing-at-point 'word)))))
58 "Open Web of Science search page in a browser."
60 (browse-url "http://apps.webofknowledge.com"))