emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sean Davis <sdavis2@mail.nih.gov>
To: Jambunathan K <kjambunathan@gmail.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: export org file to html from command-line
Date: Thu, 7 Apr 2011 07:44:49 -0400	[thread overview]
Message-ID: <BANLkTik+btDQ0OOQFcKQqAHX30nUZ5V8jQ@mail.gmail.com> (raw)
In-Reply-To: <81oc4iiqzp.fsf@gmail.com>

On Thu, Apr 7, 2011 at 1:12 AM, Jambunathan K <kjambunathan@gmail.com> wrote:
> Sean Davis <sdavis2@mail.nih.gov> writes:
>
>> I would like to have a way to export a file to html from the
>> command-line
>
> ,----[ C-h f org-export-as-html-batch RET ]
> | org-export-as-html-batch is a compiled Lisp function in `org-html.el'.
> |
> | (org-export-as-html-batch)
> |
> | Call the function `org-export-as-html'.
> | This function can be used in batch processing as:
> | emacs   --batch
> |         --load=$HOME/lib/emacs/org.el
> |         --eval "(setq org-export-headline-levels 2)"
> |         --visit=MyFile --funcall org-export-as-html-batch
> |
> | [back]
> `----

Here what I ended up doing:

/Applications/Aquamacs.app/Contents/MacOS/Aquamacs -nw --batch --eval
"(setq aquamacs-version 2)" --visit=biowulf-2011.org
--funcall=org-export-as-html

It also works fine with other exports.  Both "org-export-as-html" and
"org-export-as-pdf" work just fine.  Finally, I need to sort out the
details, but aquamacs needed to have aquamacs-version set in order to
run this in batch mode (hence, the (setq aquamacs-version 2) eval).

Thanks for the pointer to get things started.

Sean

      reply	other threads:[~2011-04-07 11:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-07  1:36 export org file to html from command-line Sean Davis
2011-04-07  5:12 ` Jambunathan K
2011-04-07 11:44   ` Sean Davis [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

  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=BANLkTik+btDQ0OOQFcKQqAHX30nUZ5V8jQ@mail.gmail.com \
    --to=sdavis2@mail.nih.gov \
    --cc=emacs-orgmode@gnu.org \
    --cc=kjambunathan@gmail.com \
    /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).