From 383fef6289d74ad819976b4ba18ce820bcf71ce7 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Tue, 23 Jul 2024 17:59:26 +0300 Subject: New function: dashboard-month-overview. * Add 3 month overview. This is currently used for testing purposes. --- gnosis-dashboard.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gnosis-dashboard.el b/gnosis-dashboard.el index d42b759..4569ac7 100644 --- a/gnosis-dashboard.el +++ b/gnosis-dashboard.el @@ -128,6 +128,17 @@ Optionally, use REMOVE-SPACES when using multiple months." (when (and (/= (forward-line 1) 0) (eobp)) (insert "\n") (forward-line 0))))) +;; TODO: Refactor this! +(defun gnosis-dashboard-month-overview () + "Insert the 3 month overview." + (let ((point (point))) + (gnosis-dashboard-reviews-graph (gnosis-dashboard-month-reviews 7) 0) + (goto-char point) + (end-of-line) + (gnosis-dashboard-reviews-graph (gnosis-dashboard-month-reviews 8) 15) + (goto-char point) + (end-of-line) + (gnosis-dashboard-reviews-graph (gnosis-dashboard-month-reviews 9) 46))) (defun gnosis-dashboard-output-note (id) "Output contents for note with ID, formatted for gnosis dashboard." (cl-loop for item in (append (gnosis-select '[main options answer tags type] 'notes `(= id ,id) t) -- cgit v1.2.3