From mboxrd@z Thu Jan 1 00:00:00 1970 From: David O'Toole Subject: [Orgmode] org-publish.el version 1.77: now with preparation-function feature Date: Thu, 07 Sep 2006 10:27:47 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GLKrG-0008Ar-KM for emacs-orgmode@gnu.org; Thu, 07 Sep 2006 10:27:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GLKrC-000860-CX for emacs-orgmode@gnu.org; Thu, 07 Sep 2006 10:27:56 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GLKrC-000857-0U for emacs-orgmode@gnu.org; Thu, 07 Sep 2006 10:27:54 -0400 Received: from [66.249.82.236] (helo=wx-out-0506.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GLKra-0007Ub-1o for emacs-orgmode@gnu.org; Thu, 07 Sep 2006 10:28:18 -0400 Received: by wx-out-0506.google.com with SMTP id i26so313004wxd for ; Thu, 07 Sep 2006 07:27:53 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: carsten.dominik@gmail.com I've added a small new feature to org-publish.el version 1.77, available from http://dto.freeshell.org/e/org-publish.el There is a new project keyword called :preparation-function. Its value should be a function with no arguments, which will be called to "prepare" a project for publishing. An example usage is to call GNU Make to update files that need processing, before publishing the resultant files. I use this to publish tarballs on my website. Here is the project definition I use to make that happen: > '("packages" > :base-directory "~/packages/" > :base-extension "gz" > :publishing-directory "/ssh:dto@tty.freeshell.org:~/html/packages/" > :publishing-function org-publish-attachment > :preparation-function (lambda () > (call-process "make" nil nil nil > "--makefile" > "/home/dto/packages/Makefile"))) This causes the *.gz to be updated when neccessary (according to the makefile) and then any updated *.gz are uploaded to the web server. -- David O'Toole dto@gnu.org http://dto.freeshell.org/notebook/