From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Hohn Subject: Re: Converting to html in a shell script Date: Thu, 13 Mar 2008 10:36:37 -0700 Message-ID: <47D96625.8020201@lbl.gov> References: <20080312200141.4273426f@mistral.stie> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JZrMQ-0003K2-4A for emacs-orgmode@gnu.org; Thu, 13 Mar 2008 13:36:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JZrMO-0003JG-DS for emacs-orgmode@gnu.org; Thu, 13 Mar 2008 13:36:57 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JZrMO-0003JA-7m for emacs-orgmode@gnu.org; Thu, 13 Mar 2008 13:36:56 -0400 Received: from ironport1.lbl.gov ([128.3.41.47]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JZrMN-0007qq-Lq for emacs-orgmode@gnu.org; Thu, 13 Mar 2008 13:36:56 -0400 In-Reply-To: <20080312200141.4273426f@mistral.stie> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: lanas Cc: emacs-orgmode@gnu.org 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 "") (org-export-as-html 3 'hidden) -- Michael