]> git.donarmstrong.com Git - org-ref.git/blob - sci-id.el
Merge branch 'journaltitle' of https://github.com/brabalan/org-ref into brabalan...
[org-ref.git] / sci-id.el
1 ;;; sci-id.el --- org-mode links for scientific IDs  -*- lexical-binding: t; -*-
2
3 ;; Copyright (C) 2015  John Kitchin
4
5 ;; Author: John Kitchin <jkitchin@andrew.cmu.edu>
6 ;; Keywords:
7
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.
12
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.
17
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/>.
20
21 ;;; Commentary:
22
23 ;; New org-mode links for scientific IDs like orcid (http://orcid.org) and researcherid (http://www.researcherid.com)
24 ;; orcid:0000-0003-2625-9232
25 ;; researcherid:A-2363-2010
26
27 ;;; Code:
28 (org-add-link-type
29  "orcid"
30  (lambda
31    (link-string)
32    (browse-url
33     (format "http://orcid.org/%s" link-string)))
34  (lambda (keyword desc format)
35    (cond
36     ((eq format 'html)
37      (format "<a href=\"http://orcid.org/%s\">orcid:%s</a>" keyword keyword)))))
38
39 (org-add-link-type
40  "researcherid"
41  (lambda
42     (link-string)
43     (browse-url
44      (format "http://www.researcherid.com/rid/%s" link-string)))
45  (lambda (keyword desc format)
46    (cond
47     ((eq format 'html)
48      (format "<a href=\"http://www.researcherid.com/rid/%s\">ResearcherID:%s</a>"
49              keyword keyword)))))
50
51 (org-add-link-type
52  "scopusid"
53  (lambda
54    (link-string)
55    (browse-url
56     (format
57      "http://www.scopus.com/authid/detail.url?origin=AuthorProfile&authorId=%s"
58      link-string)))
59  (lambda (keyword desc format)
60    (cond
61     ((eq format 'latex)
62      (format "\\href{http://www.scopus.com/authid/detail.url\\?origin=AuthorProfile&authorId=%s}{%s}" keyword desc))
63     ((eq format 'html)
64      (format "<a href=\"http://www.scopus.com/authid/detail.url?origin=AuthorProfile&authorId=%s\">scopusid:%s</a>" keyword keyword)))))
65
66 (provide 'sci-id)
67 ;;; sci-id.el ends here