From mboxrd@z Thu Jan 1 00:00:00 1970 From: Iannis Zannos Subject: Re: Run commands after html export #orgmode Date: Sat, 12 Oct 2013 15:19:19 +0300 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c33b3c8fef7904e88a3ebe Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUyAH-00011k-Mh for emacs-orgmode@gnu.org; Sat, 12 Oct 2013 08:19:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VUyAD-0002ee-00 for emacs-orgmode@gnu.org; Sat, 12 Oct 2013 08:19:25 -0400 Received: from mail-ea0-x22e.google.com ([2a00:1450:4013:c01::22e]:56684) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUyAC-0002eZ-L7 for emacs-orgmode@gnu.org; Sat, 12 Oct 2013 08:19:20 -0400 Received: by mail-ea0-f174.google.com with SMTP id z15so2413114ead.5 for ; Sat, 12 Oct 2013 05:19:19 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Jarmo Hurri Cc: emacs-orgmode@gnu.org --001a11c33b3c8fef7904e88a3ebe Content-Type: text/plain; charset=ISO-8859-1 Hello Jarmo, it may be useful to look into the publishing scheme of org-mode. Export = export a single file Publish = publish a set of files. More extensive configuration capabilities. Can also be used to publish single file. Publish provides very extensive configuration capabilities, which include a preparation-function and a completion-function hook. The completion function can be used to ftp or rsync or otherwise copy data to the target directory. Have a look at: http://orgmode.org/worg/doc.html search for: org-publish-project-alist. In that section you will find following passage: `:publishing-function' Function to publish file. Each back-end may define its own (i.e. `org-latex-publish-to-pdf', `org-html-publish-to-html'). May be a list of functions, in which case each function in the list is invoked in turn. Another property allows you to insert code that prepares a project for publishing. For example, you could call GNU Make on a certain makefile, to ensure published files are built up to date. `:preparation-function' Function to be called before publishing this project. This may also be a list of functions. `:completion-function' Function to be called after publishing this project. This may also be a list of functions. You will find more info in the orgmode manual here: http://orgmode.org/manual/Configuration.html#Configuration and here: http://orgmode.org/manual/Sources-and-destinations.html#Sources-and-destinations and in further related parts linked-to from the above. Hopefully the above is useful. Best, Iannis Zannos On Sat, Oct 12, 2013 at 2:11 PM, Jarmo Hurri wrote: > > Answering my own question... > > > What I would like to do now is to automatically run some commands > > after I have exported an org file as html. > > I ended up circumventing the problem - that is, the exporter - by > creating a code block in which I first run org-html-export-to-html and > then do my git stuff. I no longer use the exporter, I just evaluate the > block. > > Lesson learned. > > Jarmo > > > --001a11c33b3c8fef7904e88a3ebe Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable


Hello Jarmo,=A0

it may be useful to look into the publishing scheme of = org-mode.=A0
Export =3D export a single file
Publish =3D publish a set of files. More extensive configu= ration capabilities. Can also be used to publish single file.=A0

Publish provides very extensive config= uration capabilities, which include a preparation-function and a completion= -function hook. The completion function can be used to ftp or rsync or othe= rwise copy data to the target directory. Have a look at:=A0

http://orgmode.org/worg/doc.html sear= ch for:=A0org-publish-project-alist. In that section you will find followin= g passage:=A0

=A0 `:publishing-function&= #39;

= =A0 =A0 Function to publish file. =A0Each back-end may define its
=A0 =A0 own (i.e. `org-latex-publish-to-pdf'= ,
=A0 =A0 `org-html-publish-to-html'). = =A0May be a list of functions, in
=A0 =A0 w= hich case each function in the list is invoked in turn.

Another pro= perty allows you to insert code that prepares
a project for publishing. =A0For example, you could call GNU Make
<= div class=3D"gmail_extra"> on a certain makefile, to ensure published files are built up to
date.

=A0 `:preparation-function'

=A0 =A0 Function to be called before p= ublishing this project. =A0This
=A0 =A0 may= also be a list of functions.

=A0 `:completion-function'

=A0 =A0 Function to be called after publishing thi= s project. =A0This
=A0 =A0 may also be a li= st of functions.

You will find more info in the orgmode manual her= e:=A0
and here:=A0
and in further related parts linked-to from the above.=A0<= /div>

Hopefully = the above is useful.=A0

Best,=A0
Iannis Zannos


On Sat, Oct 12, 2013 at 2:11 PM, Jarmo Hurri <jarm= o.hurri@syk.fi> wrote:

Answering my own question...

> What I would like to do now is to automatically run some commands
> after I have exported an org file as html.

I ended up circumventing the problem - that is, the exporter - by
creating a code block in which I first run org-html-export-to-html and
then do my git stuff. I no longer use the exporter, I just evaluate the
block.

Lesson learned.

Jarmo



--001a11c33b3c8fef7904e88a3ebe--