From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: batch exporting Date: Sun, 20 Dec 2009 14:09:05 -0500 Message-ID: <19518.1261336145@gamaville.dokosmarshall.org> References: Reply-To: nicholas.dokos@hp.com Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NMRBI-0001o9-8l for emacs-orgmode@gnu.org; Sun, 20 Dec 2009 14:11:04 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NMRBD-0001iO-JZ for emacs-orgmode@gnu.org; Sun, 20 Dec 2009 14:11:03 -0500 Received: from [199.232.76.173] (port=34002 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NMRBD-0001iE-Gl for emacs-orgmode@gnu.org; Sun, 20 Dec 2009 14:10:59 -0500 Received: from vms173017pub.verizon.net ([206.46.173.17]:35214) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NMRBD-0004kT-B0 for emacs-orgmode@gnu.org; Sun, 20 Dec 2009 14:10:59 -0500 Received: from gamaville.dokosmarshall.org ([173.76.32.106]) by vms173017.mailsrvcs.net (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPA id <0KUY0040WT766JM5@vms173017.mailsrvcs.net> for emacs-orgmode@gnu.org; Sun, 20 Dec 2009 13:09:11 -0600 (CST) In-reply-to: Message from andrea of "Sun, 20 Dec 2009 19:26:48 +0100." 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: andrea.crotti.0@gmail.com Cc: emacs-orgmode@gnu.org andrea wrote: > > Given that I often would like to export to some formats I would like to > create the final script that handles everything. > > If easy enough it can also be useful for non org users that still would > like to get the output formatted... > > So my attempt is here > --8<---------------cut here---------------start------------->8--- > #!/bin/bash > > # Pass as input the file you want to convert to html > > FILE=$1 > > if ! test -f $FILE > then > echo "file not found" > else > echo "converting file $FILE" > # TODO putting a minimal init file > emacs --batch \ > --eval "(add-to-list 'load-path \"$HOME/.emacs.d/org-mode/lisp/\")" \ > --load=$HOME/.emacs.d/org-mode/lisp/org.el \ > --visit=MyFile --funcall org-export-as-html-batch > fi > > help() { > echo "pass a file to export" > } > > --8<---------------cut here---------------end--------------->8--- > > But it gives this error > *Wrong type argument: commandp, org-export-as-html-batch* > > Then I would like to add some flags to export in different formats and > to set destination and source. > > And by the way, the script given as example in the function help doesn't > work... > > See the thread at http://thread.gmane.org/gmane.emacs.orgmode/17059 HTH, Nick