emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Hohn <mhhohn@lbl.gov>
To: lanas <lanas@securenet.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: Converting to html in a shell script
Date: Thu, 13 Mar 2008 10:36:37 -0700	[thread overview]
Message-ID: <47D96625.8020201@lbl.gov> (raw)
In-Reply-To: <20080312200141.4273426f@mistral.stie>

lanas wrote:
> Hi all,
>
>   I would like to convert an org file to HTML, much like C-c C-e h
> would do, automatically from a shell script.  So far I've tried
> unsuccesfully some permutaions of:
>
> emacs -batch -l ~/.emacs -eval '(org-export-as-html "./file.org")'
> emacs -batch -l ~/.emacs -eval '(org-export-as-html)' ./file.org
>
>   Is it at all possible and if so, what would be the actual way of
> calling emacs to do this ?
>
>   

I use a makefile entry

%.html: %.org org-export-cust.el
    emacs --batch -q $< -l ./org-export-cust.el
    tidy -i -m $@


together with this org-export-cust.el script:

;; Batch script to convert %.org to %.html, with external style sheet
;; and other options.
;;
;; Used via     emacs --batch -q $< -l ./org-export-cust.el
;;
(load-library "~/emacs/lisp/org.elc")

(setq org-export-html-style
      "<link rel=stylesheet href=\"l3style.css\" type=\"text/css\">")

(org-export-as-html 3 'hidden)

-- Michael

      parent reply	other threads:[~2008-03-13 17:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-13  0:01 Converting to html in a shell script lanas
2008-03-13  1:04 ` Bastien Guerry
2008-03-13 17:36 ` Michael Hohn [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=47D96625.8020201@lbl.gov \
    --to=mhhohn@lbl.gov \
    --cc=emacs-orgmode@gnu.org \
    --cc=lanas@securenet.net \
    /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).