From 132bf50bc657b747a164582a1773558a1b7d3a49 Mon Sep 17 00:00:00 2001 From: John Kitchin Date: Tue, 15 Dec 2015 14:39:09 -0500 Subject: [PATCH] add sci-id back --- org-ref-sci-id.el | 55 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 org-ref-sci-id.el diff --git a/org-ref-sci-id.el b/org-ref-sci-id.el new file mode 100644 index 00000000..1d4ceb8d --- /dev/null +++ b/org-ref-sci-id.el @@ -0,0 +1,55 @@ +;;; org-ref-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: + +(require 'org) + +(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 (or desc 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 (or desc keyword)))))) + +(provide 'org-ref-sci-id) +;;; org-ref-sci-id.el ends here