Skip to content

Instantly share code, notes, and snippets.

@mardukbp
Last active December 23, 2015 02:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mardukbp/6567775 to your computer and use it in GitHub Desktop.
Save mardukbp/6567775 to your computer and use it in GitHub Desktop.
Zotero-like arXiv integration for ebib UPDATED (Sep. 16 2013)
(setq arxiv-dir "~/Papers/arxiv/")
(defun ebib-import-arxiv (arxiv-url)
(interactive)
(let ((tempbuff (get-buffer-create "*arxiv*"))
(arxiv-id (car (cdr (split-string arxiv-url "abs/"))))
(arxiv-pdf-url (concat (replace-regexp-in-string "abs" "pdf" arxiv-url) ".pdf")))
(call-process-shell-command "arxiv2bib.py" nil tempbuff nil arxiv-id)
(call-process-shell-command "links" nil nil nil
"-source" arxiv-pdf-url "> " (concat arxiv-dir arxiv-id ".pdf"))
(with-current-buffer tempbuff
(ebib-import)
(kill-buffer (current-buffer)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment