diff options
author | Thanos Apollo <[email protected]> | 2024-02-20 13:29:53 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-02-20 13:29:53 +0200 |
commit | 6f05efdcc861d8d3a0ef374ceafe91f735da10cf (patch) | |
tree | 9b4b85d76cd180559b2889d46c013103b5fc5022 /gnosis.el | |
parent | f7c73b592069072d70cebdeac22ad7e0a9608b2f (diff) |
Add gnosis-dashboard-output-note
Diffstat (limited to 'gnosis.el')
-rw-r--r-- | gnosis.el | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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) |