diff options
author | Thanos Apollo <[email protected]> | 2024-08-07 01:40:33 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-08-07 01:40:33 +0300 |
commit | b110a688f4378234bb6fee99a2bfbd8c426d5b74 (patch) | |
tree | 31e9a4b5e34a1537e0b58d1046b72479b0bd3a32 /gnosis.el | |
parent | 0625ac6501884f6da8fa9fe7a55c006b328d3885 (diff) |
New functions: get-note-anagnosis.
* Return values for anagnosis from deck & tags.
Diffstat (limited to 'gnosis.el')
-rw-r--r-- | gnosis.el | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -2105,6 +2105,26 @@ CUSTOM-VALUES: Specify values for tags." custom-values)))) gnosis-algorithm-proto))) (gnosis-proto-max-values proto-values))) + +(defun gnosis-get-note-tag-anagnosis (id &optional custom-tags custom-values) + "Return the minimum anagnosis tag value for note ID." + (let ((anagnosis-values (gnosis-get-custom-tag-values id :anagnosis custom-tags custom-values))) + (if anagnosis-values + (apply #'min anagnosis-values) + gnosis-algorithm-anagnosis-value))) + +(defun gnosis-get-note-deck-anagnosis (id &optional custom-deck custom-values) + "Return anagnosis deck value for note ID." + (let ((deck (or (gnosis-get-note-deck-name id) custom-deck))) + (or (gnosis-get-custom-deck-value deck :anagnosis custom-values) + gnosis-algorithm-anagnosis-value))) + +(defun gnosis-get-note-anagnosis (id &optional custom-deck custom-tags custom-values) + "Return minimum anagnosis value for note ID." + (let* ((deck-anagnosis (gnosis-get-note-deck-anagnosis id custom-deck custom-values)) + (tag-anagnosis (gnosis-get-note-tag-anagnosis id custom-tags custom-values)) + (note-anagnosis (min deck-anagnosis tag-anagnosis))) + note-anagnosis)) (defun gnosis-get-date-total-notes (&optional date) "Return total notes reviewed for DATE. |