From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Ruben Maher <r@rkm.id.au>
Cc: emacs-orgmode@gnu.org
Subject: Re: [Feature Request] Let publishing-function decide :output-file and whether publishing is needed
Date: Sun, 02 Aug 2015 18:24:09 +0200 [thread overview]
Message-ID: <87614xacba.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87oaj0d43r.fsf@ayanami.rkm.id.au> (Ruben Maher's message of "Sat, 25 Jul 2015 18:08:16 +0930")
Hello,
Ruben Maher <r@rkm.id.au> writes:
> I've been working on a derived exporter to publish a static blog, and
> I've run into some issues. Say that `:publishing-directory' is
> "~/public_html" and I have `:base-directory' with an Org file foo.org.
>
> foo.org has option keywords like this:
>
> #+title: foo.org
> #+date: <2015-07-25 Sat 17:21:41>
>
>
> My derived exporter visits each Org file to get information from the
> keywords, and would export foo.org like so: foo.org ->
> ~/public_html/2015/07/25/foo/index.html, using something like
>
>
> #+begin_src elisp
> (let ((pub-dir
> (file-name-as-directory
> (concat (expand-file-name pub-dir)
> (format-time-string "%Y/%m/%d/" date)
> (file-name-base filename)))))
> (org-publish-org-to
> 'rkm-html filename
> (concat "." (or (plist-get plist :html-extension)
> org-html-extension "html"))
> (org-combine-plists plist '(:output-file "index")) pub-dir))
> #+end_src
Can't you simply use org-publish-after-publishing-hook to copy the
published file elsewhere?
Or, if you write your own exporter, do it à la "ox-latex.el", i.e.,
publish in :base-directory and move it elsewhere with
`org-publish-attachment'?
>
> I have achieved this using the attached diff, which tells
> `org-export-output-file-name' to respect the property `:output-file' in
> the communications channel.
This doesn't sound right: if you know the file name beforehand, you
don't need to call `org-export-output-file-name' in the first place.
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2015-08-02 16:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-25 8:38 [Feature Request] Let publishing-function decide :output-file and whether publishing is needed Ruben Maher
2015-07-28 13:21 ` Rasmus
2015-08-22 1:29 ` Ruben Maher
2015-08-02 16:24 ` Nicolas Goaziou [this message]
2015-08-22 1:32 ` Ruben Maher
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=87614xacba.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=r@rkm.id.au \
/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).