1.1--- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2+++ b/lisp/lib/skel/comp/org.lisp Sun Jun 30 17:54:33 2024 -0400
1.3@@ -0,0 +1,30 @@
1.4+;;; org.lisp --- Skel Org File Components
1.5+
1.6+;;
1.7+
1.8+;;; Code:
1.9+(in-package :skel/comp/org)
1.10+
1.11+(defclass sk-org-file (sk-component org-document sk-meta) ())
1.12+
1.13+(defmethod sk-new ((self (eql :org)) &rest args)
1.14+ (apply #'make-instance 'sk-org-file args))
1.15+
1.16+(defmethod sk-convert ((self org-document))
1.17+ (let ((self (change-class self 'sk-org-file)))
1.18+ (update-id self)
1.19+ self))
1.20+
1.21+(defmethod sk-load-component ((kind (eql :org)) (name pathname))
1.22+ (declare (ignore kind))
1.23+ (let* ((name (namestring name))
1.24+ (path (make-pathname :name name :type "org"))
1.25+ (comp (sk-convert (org-parse :document path))))
1.26+ (setf (sk-name comp) name)
1.27+ (setf (sk-path comp) path)
1.28+ comp))
1.29+
1.30+;; (describe (sk-load-component :org #p"readme"))
1.31+
1.32+
1.33+