diff options
-rw-r--r-- | www/build-site.el | 43 | ||||
-rw-r--r-- | www/www.org | 43 |
2 files changed, 70 insertions, 16 deletions
diff --git a/www/build-site.el b/www/build-site.el index d3ef3d1..e1c712e 100644 --- a/www/build-site.el +++ b/www/build-site.el @@ -2,15 +2,42 @@ ( 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" ) ) 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 |