]> git.donarmstrong.com Git - org-ref.git/commitdiff
add date added to the entry
authorJohn Kitchin <jkitchin@andrew.cmu.edu>
Wed, 4 Mar 2015 17:15:31 +0000 (12:15 -0500)
committerJohn Kitchin <jkitchin@andrew.cmu.edu>
Wed, 4 Mar 2015 17:15:31 +0000 (12:15 -0500)
doi-utils.org

index 442aaa7e91aae7adad83ac1eeeaf30f5b7587388..8428cc8358ee8c02ddc8efb4a416bd06fa507918 100644 (file)
@@ -603,6 +603,8 @@ org-ref, and tries to download the corresponding pdf."
   (interactive "sDOI :")
   (insert (doi-utils-doi-to-bibtex-string doi))
   (backward-char)
+  ;; set date added for the record
+  (bibtex-set-field "DATE_ADDED" (current-time-string))
   (if (bibtex-key-in-head nil)
        (org-ref-clean-bibtex-entry t)
      (org-ref-clean-bibtex-entry))
@@ -610,6 +612,7 @@ org-ref, and tries to download the corresponding pdf."
    (doi-utils-get-bibtex-entry-pdf)
    (save-selected-window
      (org-ref-open-bibtex-notes)))
+
 #+END_SRC
 
 It may be you are in some other place when you want to add a bibtex entry. This next function will open the first entry in org-ref-default-bibliography go to the end, and add the entry. You can sort it later.