summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-08-07 01:40:59 +0300
committerThanos Apollo <[email protected]>2024-08-07 01:40:59 +0300
commit5139170894cddef400c59bcbb244c59466f594ae (patch)
tree29420fb8e448a681bfaacac9fe4b9832ce519047 /gnosis.el
parentb110a688f4378234bb6fee99a2bfbd8c426d5b74 (diff)
New functions: get-note-lethe.
* Return lethe value for note.
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el21
1 files changed, 21 insertions, 0 deletions
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.