X-Git-Url: https://git.donarmstrong.com/?p=org-ref.git;a=blobdiff_plain;f=doi-utils.org;h=e6c026688399f477ba677b39961d8b756efbe90a;hp=e08e6013ab8b33b0eb7416acf4179b6429b22c3a;hb=89e5e67f1b6774840cac214f38bf77e43aedf306;hpb=fa6df2b17cdde5c9d60c2085e4bfadecb3897250 diff --git a/doi-utils.org b/doi-utils.org index e08e601..e6c0266 100644 --- a/doi-utils.org +++ b/doi-utils.org @@ -335,14 +335,14 @@ until one is found" : doi-utils-get-pdf-url -#+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp :tangle no (doi-utils-get-pdf-url "10.1126/science.1158722") #+END_SRC #+RESULTS: : http://www.sciencemag.org/content/321/5890/792.full.pdf -#+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp :tangle no (doi-utils-get-pdf-url "10.1021/nl500037x") #+END_SRC @@ -350,7 +350,7 @@ until one is found" : http://pubs.acs.org/doi/pdf/10.1021/nl500037x -#+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp :tangle no (doi-utils-get-pdf-url "10.1002/anie.201402680") #+END_SRC @@ -424,7 +424,7 @@ I [[http://homepages.see.leeds.ac.uk/~eeaol/notes/2013/02/doi-metadata/][found]] : doi-utils-get-json-metadata For example: -#+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp :tangle no (doi-utils-get-json-metadata "10.1103/PhysRevLett.99.016105") #+END_SRC @@ -451,6 +451,7 @@ Now we define a function that fills in that template from the metadata. results author title + booktitle journal year volume @@ -485,6 +486,20 @@ Now we define a function that fills in that template from the metadata. doi = {%{doi}}, url = {%{url}}, }")) + + ((string= type "proceedings-article") + (setq booktitle (plist-get results :container-title)) + (doi-utils-expand-template "@inproceedings{, + author = {%{author}}, + title = {%{title}}, + booktitle = {%{booktitle}}, + year = {%{year}}, + month = {%{month}}, + pages = {%{pages}}, + doi = {%{doi}}, + url = {%{url}}, +}")) + (t (message-box "%s not supported yet." type))))) #+END_SRC @@ -492,7 +507,7 @@ Now we define a function that fills in that template from the metadata. : doi-utils-doi-to-bibtex-string To see that in action: -#+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp :tangle no (doi-utils-doi-to-bibtex-string "10.1103/PhysRevLett.99.016105") #+END_SRC @@ -647,7 +662,7 @@ The updating function looks like this. We get all the keys from the json plist m (provide 'doi-utils) #+END_SRC * load -#+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp :tangle no (org-babel-load-file "doi-utils.org") #+END_SRC