emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Iannis Zannos <zannos@gmail.com>
To: Jarmo Hurri <jarmo.hurri@syk.fi>
Cc: emacs-orgmode@gnu.org
Subject: Re: Run commands after html export #orgmode
Date: Sat, 12 Oct 2013 15:19:19 +0300	[thread overview]
Message-ID: <CAEC5JkLrs5ojM8H+ksErzaZ=tbaX=chJqwOGUG0nb4o98pFg_g@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2100 bytes --]

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 <jarmo.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
>
>
>

[-- Attachment #2: Type: text/html, Size: 4245 bytes --]

             reply	other threads:[~2013-10-12 12:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-12 12:19 Iannis Zannos [this message]
2013-10-13  7:11 ` Run commands after html export Jarmo Hurri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEC5JkLrs5ojM8H+ksErzaZ=tbaX=chJqwOGUG0nb4o98pFg_g@mail.gmail.com' \
    --to=zannos@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jarmo.hurri@syk.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).