This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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) )) |