X-Git-Url: https://git.donarmstrong.com/?p=org-ref.git;a=blobdiff_plain;f=sci-id.el;fp=sci-id.el;h=f204c384028bdc22f582df6bf9da8f12a57e0372;hp=0000000000000000000000000000000000000000;hb=3f79a48e7c9188ce8d8a03da19ae1b2496c5d4cf;hpb=e15d6b6fd62ef1ce8f807ef6f7b0f957cf9092a5 diff --git a/sci-id.el b/sci-id.el new file mode 100644 index 0000000..f204c38 --- /dev/null +++ b/sci-id.el @@ -0,0 +1,67 @@ +;;; sci-id.el --- org-mode links for scientific IDs -*- lexical-binding: t; -*- + +;; Copyright (C) 2015 John Kitchin + +;; Author: John Kitchin +;; Keywords: + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; New org-mode links for scientific IDs like orcid (http://orcid.org) and researcherid (http://www.researcherid.com) +;; orcid:0000-0003-2625-9232 +;; researcherid:A-2363-2010 + +;;; Code: +(org-add-link-type + "orcid" + (lambda + (link-string) + (browse-url + (format "http://orcid.org/%s" link-string))) + (lambda (keyword desc format) + (cond + ((eq format 'html) + (format "orcid:%s" keyword keyword))))) + +(org-add-link-type + "researcherid" + (lambda + (link-string) + (browse-url + (format "http://www.researcherid.com/rid/%s" link-string))) + (lambda (keyword desc format) + (cond + ((eq format 'html) + (format "ResearcherID:%s" + keyword keyword))))) + +(org-add-link-type + "scopusid" + (lambda + (link-string) + (browse-url + (format + "http://www.scopus.com/authid/detail.url?origin=AuthorProfile&authorId=%s" + link-string))) + (lambda (keyword desc format) + (cond + ((eq format 'latex) + (format "\\href{http://www.scopus.com/authid/detail.url?origin=AuthorProfile&authorId=%s}{%s}" keyword (or desc keyword))) + ((eq format 'html) + (format "scopusid:%s" keyword keyword))))) + +(provide 'sci-id) +;;; sci-id.el ends here