From 5139170894cddef400c59bcbb244c59466f594ae Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Wed, 7 Aug 2024 01:40:59 +0300 Subject: New functions: get-note-lethe. * Return lethe value for note. --- gnosis.el | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/gnosis.el b/gnosis.el index cb08581..310072e 100644 --- a/gnosis.el +++ b/gnosis.el @@ -2125,6 +2125,27 @@ CUSTOM-VALUES: Specify values for tags." (tag-anagnosis (gnosis-get-note-tag-anagnosis id custom-tags custom-values)) (note-anagnosis (min deck-anagnosis tag-anagnosis))) note-anagnosis)) + +(defun gnosis-get-note-deck-lethe (id &optional custom-deck custom-values) + "Return lethe deck value for note ID." + (let ((deck (or (gnosis-get-note-deck-name id) custom-deck))) + (or (gnosis-get-custom-deck-value deck :lethe custom-values) + gnosis-algorithm-lethe-value))) + +(defun gnosis-get-note-tag-lethe (id &optional custom-tags custom-values) + "Return note ID tag lethe values." + (let ((lethe-values (gnosis-get-custom-tag-values id :lethe custom-tags custom-values))) + (if lethe-values + (apply #'min lethe-values) + gnosis-algorithm-lethe-value))) + +(defun gnosis-get-note-lethe (id &optional custom-deck custom-tags custom-values) + "Return note ID lethe value." + (let* ((deck-lethe (gnosis-get-note-deck-lethe id custom-deck custom-values)) + (tag-lethe (gnosis-get-note-tag-lethe id custom-tags custom-values)) + (note-lethe (min deck-lethe tag-lethe))) + note-lethe)) + (defun gnosis-get-date-total-notes (&optional date) "Return total notes reviewed for DATE. -- cgit v1.2.3