From 1c78e3098aab34d330bbb7c8e5fe60fac037ddb8 Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Sat, 20 Jan 2024 10:29:31 +0100 Subject: Implement composition of org-publish-project-alist The current object implementation is able to compose a list of project names into =org-publish-project-alist= . Yet to be implemented are the property parser, as well as the components parser. --- www/www.org | 43 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) (limited to 'www/www.org') diff --git a/www/www.org b/www/www.org index 831ee05..980f3e6 100644 --- a/www/www.org +++ b/www/www.org @@ -47,18 +47,45 @@ are also published, in the sequence given. ( require 'ox-publish ) - ( defun publication-builder () - ( let ( ( success-report "Build complete!" ) ) + ( defun publication-object ( ) + ( let ( ( object-projects ( list ) ) + ( org-publish-project-alist ( list ) ) + ( success-report "Build complete!" ) ) ( list - :success-report - ( lambda () - ( message success-report ) + + :object-compose + ( lambda ( ) + ( setq org-publish-project-alist ( list object-projects ) ) + ( ) ) + + :object-get-projects + ( lambda ( data-projects ) + ( setq object-projects ( append data-projects object-projects ) ) + ( ) ) + + :object-report + ( lambda ( ) + ( print object-projects ) + ( print org-publish-project-alist ) + ( print success-report ) ( ) ) ) ) ) - ( setq publish - ( plist-get ( publication-builder ) :success-report ) ) + ( setq publication-instance ( publication-object ) ) + + ( setq object-compose ( plist-get publication-instance :object-compose ) ) + + ( setq object-projects ( plist-get publication-instance :object-get-projects ) ) + + ( setq object-report ( plist-get publication-instance :object-report ) ) + + ( defun publish ( &rest project-data ) + ( let ( ( data-projects ( plist-get project-data :data-projects ) ) ) + ( funcall object-projects data-projects ) + ( funcall object-compose ) + ( funcall object-report ) + ( ) ) ) - ( funcall publish ) + ( publish :data-projects ( list "marekpasnikowski.pl" ) ) #+END_SRC * EOF -- cgit v1.2.3