Skip to content

Instantly share code, notes, and snippets.

@wigol
wigol / org-roam-singlepage-journal.el
Last active June 3, 2024 09:38
org-roam dailies report
(defun wg/build-roam-journal ()
(interactive)
(let ((journal_files (org-roam-db-query [:select [title, file] :from nodes :where (like file "%/journals/%") :order-by [(asc file)]])))
(with-output-to-temp-buffer "*eng-journal-export*"
(pop-to-buffer "*eng-journal-export*")
(org-mode)
(erase-buffer)
(insert (format "#+title: Engineering Journal\n#+date: %s\n#+options: broken-links:t toc:nil num:nil\n" (format-time-string "%Y-%m-%d")))
(dolist (jfile journal_files)
(insert (format "* %s\n" (car jfile) ))