From: Kaushal Modi <kaushal.modi@gmail.com>
To: Christopher DeMarco <cdemarco@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: How to run a command after exporting agenda to HTML?
Date: Wed, 10 Aug 2016 16:21:08 +0000 [thread overview]
Message-ID: <CAFyQvY0sYL643cMNHTpuj3fJAVsJLBFybPp9r2qUNNZgLRSKcg@mail.gmail.com> (raw)
In-Reply-To: <CA+KxQyaLus-HUNEv=i+eg1aSAj3XtZ81BJGP2NYBX=JtC1w_QQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1397 bytes --]
See if this helps:
(defun my-org-html-post-process (file)
"Do stuff on FILE after it is created by org html export."
;; Do your stuff here
(message "Exported file: %s" file)
file) ; Has to return FILE
(defun my-org-html-export-to-html
(&optional async subtreep visible-only body-only ext-plist)
"Pass `my-org-html-post-process' as POST-PROCESS arg to
`org-export-to-file'.
Rest of the code is the exact same as the original
`org-html-export-to-html'."
(interactive)
(let* ((extension (concat "." (or (plist-get ext-plist :html-extension)
org-html-extension
"html")))
(file (org-export-output-file-name extension subtreep))
(org-export-coding-system org-html-coding-system))
(org-export-to-file 'html file
async subtreep visible-only body-only ext-plist
#'my-org-html-post-process)))
(advice-add 'org-html-export-to-html :override #'my-org-html-export-to-html)
On Wed, Aug 10, 2016 at 5:28 AM Christopher DeMarco <cdemarco@gmail.com>
wrote:
> Hi all . . . I want to run a command (to sync a directory with AWS S3)
> after my agenda views are exported to HTML. There used to be a
> `org-export-html-final-hook` which looks like something that could be
> helpful, but it doesn't appear to be available anymore.
>
> Is there a way to do this in current Org?
>
--
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 2163 bytes --]
prev parent reply other threads:[~2016-08-10 16:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-10 9:27 How to run a command after exporting agenda to HTML? Christopher DeMarco
2016-08-10 16:21 ` Kaushal Modi [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFyQvY0sYL643cMNHTpuj3fJAVsJLBFybPp9r2qUNNZgLRSKcg@mail.gmail.com \
--to=kaushal.modi@gmail.com \
--cc=cdemarco@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.