emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* export org file to html from command-line
@ 2011-04-07  1:36 Sean Davis
  2011-04-07  5:12 ` Jambunathan K
  0 siblings, 1 reply; 3+ messages in thread
From: Sean Davis @ 2011-04-07  1:36 UTC (permalink / raw)
  To: emacs-orgmode

I'm new to org-mode but would like to use it for preparing docs for
latex and html.  This works perfectly from within emacs (aquamacs,
actually).  I would like to have a way to export a file to html from
the command-line so that I can potentially include and org-to-html
filter for my static website generator.  I have seen org-ruby and it
works, but it does not fully support org-mode.  Any pointers on how I
can go about this?

Thanks,
Sean

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: export org file to html from command-line
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Jambunathan K @ 2011-04-07  5:12 UTC (permalink / raw)
  To: Sean Davis; +Cc: emacs-orgmode

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]
`----


-- 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: export org file to html from command-line
  2011-04-07  5:12 ` Jambunathan K
@ 2011-04-07 11:44   ` Sean Davis
  0 siblings, 0 replies; 3+ messages in thread
From: Sean Davis @ 2011-04-07 11:44 UTC (permalink / raw)
  To: Jambunathan K; +Cc: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-04-07 11:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

Code repositories for project(s) associated with this 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).