diff options
author | Marek Paśnikowski <marek@marekpasnikowski.pl> | 2024-01-20 10:29:31 +0100 |
---|---|---|
committer | Marek Paśnikowski <marek@marekpasnikowski.pl> | 2024-01-20 10:29:31 +0100 |
commit | 1c78e3098aab34d330bbb7c8e5fe60fac037ddb8 (patch) | |
tree | b73c10bfd8d6e7030a45ec027b7863e1bfaec477 /www/www.org | |
parent | 74d62c2a1acb6e9d6aa78cc1670866b435313c12 (diff) |
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.
Diffstat (limited to 'www/www.org')
-rw-r--r-- | www/www.org | 43 |
1 files changed, 35 insertions, 8 deletions
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 |