summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnosis.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/gnosis.el b/gnosis.el
index 538b4e6..1ef8b0b 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -1357,6 +1357,16 @@ review."
(:foreign-key [id] :references notes [id]
:on-delete :cascade)))
+;; Dashboard
+(defun gnosis-dashboard-output-note (id)
+ "Output note contents formatted for gnosis dashboard."
+ (cl-loop for item in (append (gnosis-select '[main options answer tags] 'notes `(= id ,id) t)
+ (gnosis-select 'suspend 'review-log `(= id ,id) t))
+ if (listp item)
+ collect (mapconcat #'identity item ", ")
+ else
+ collect (prin1-to-string item)))
+
(defun gnosis-db-init ()
"Create gnosis essential directories & database."
(unless (length= (emacsql gnosis-db [:select name :from sqlite-master :where (= type table)]) 6)