From bae6487afd5e6eec9f04b38b235bbac24042ca62 Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Wed, 6 Oct 2021 13:17:43 +0200 Subject: feat: filter dailes (#68) --- org-roam-ui.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'org-roam-ui.el') diff --git a/org-roam-ui.el b/org-roam-ui.el index 2cde148..f363331 100644 --- a/org-roam-ui.el +++ b/org-roam-ui.el @@ -219,6 +219,7 @@ This serves the web-build and API over HTTP." (remove-hook 'after-save-hook #'org-roam-ui--on-save) (org-roam-ui-follow-mode -1))))) + (defun org-roam-ui--on-save () "Send graphdata on saving an org-roam buffer." (when (org-roam-buffer-p) @@ -378,6 +379,15 @@ unchanged." org-roam-ui-custom-theme)) ui-theme)) + +(defun org-roam-ui--send-variables (ws) + "Send org-roam variables through the websocket WS." + (when (boundp 'org-roam-dailies-directory) + (websocket-send-text ws (json-encode `((type . "variables") + (data . + (("daily-directory" . ,(concat org-roam-directory org-roam-dailies-directory)) + ("org-roam-directory" . ,org-roam-directory)))))))) + (defun org-roam-ui-sql-to-alist (column-names rows) "Convert sql result to alist for json encoding. ROWS is the sql result, while COLUMN-NAMES is the columns to use." @@ -394,6 +404,8 @@ ROWS is the sql result, while COLUMN-NAMES is the columns to use." (setq rows nil))) res)) + + ;; (defservlet* id/:id text/html () ;; (let ((node (org-roam-populate (org-roam-node-create :id id))) ;; html-string) -- cgit v1.2.3