Klimi's new dotfiles with stow.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.9 KiB

4 years ago
  1. ;;; org-ref-sci-id.el --- org-mode links for scientific IDs -*- lexical-binding: t; -*-
  2. ;; Copyright (C) 2015 John Kitchin
  3. ;; Author: John Kitchin <jkitchin@andrew.cmu.edu>
  4. ;; Keywords:
  5. ;; This program is free software; you can redistribute it and/or modify
  6. ;; it under the terms of the GNU General Public License as published by
  7. ;; the Free Software Foundation, either version 3 of the License, or
  8. ;; (at your option) any later version.
  9. ;; This program is distributed in the hope that it will be useful,
  10. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. ;; GNU General Public License for more details.
  13. ;; You should have received a copy of the GNU General Public License
  14. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. ;;; Commentary:
  16. ;; New org-mode links for scientific IDs like orcid (http://orcid.org) and researcherid (http://www.researcherid.com)
  17. ;; orcid:0000-0003-2625-9232
  18. ;; researcherid:A-2363-2010
  19. ;;; Code:
  20. (require 'org)
  21. (require 'org-ref-utils)
  22. (org-ref-link-set-parameters "orcid"
  23. :follow (lambda
  24. (link-string)
  25. (browse-url
  26. (format "http://orcid.org/%s" link-string)))
  27. :export (lambda (keyword desc format)
  28. (cond
  29. ((eq format 'html)
  30. (format "<a href=\"http://orcid.org/%s\">orcid:%s</a>" keyword (or desc keyword))))))
  31. (org-ref-link-set-parameters "researcherid"
  32. :follow (lambda
  33. (link-string)
  34. (browse-url
  35. (format "http://www.researcherid.com/rid/%s" link-string)))
  36. :export (lambda (keyword desc format)
  37. (cond
  38. ((eq format 'html)
  39. (format "<a href=\"http://www.researcherid.com/rid/%s\">ResearcherID:%s</a>"
  40. keyword (or desc keyword))))))
  41. (provide 'org-ref-sci-id)
  42. ;;; org-ref-sci-id.el ends here