From mboxrd@z Thu Jan 1 00:00:00 1970 From: andrea Subject: batch exporting Date: Sun, 20 Dec 2009 19:26:48 +0100 Message-ID: Reply-To: andrea.crotti.0@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NMQV0-0001dm-Pq for emacs-orgmode@gnu.org; Sun, 20 Dec 2009 13:27:23 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NMQUw-0001Yk-0M for emacs-orgmode@gnu.org; Sun, 20 Dec 2009 13:27:22 -0500 Received: from [199.232.76.173] (port=40251 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NMQUv-0001YO-Ls for emacs-orgmode@gnu.org; Sun, 20 Dec 2009 13:27:17 -0500 Received: from lo.gmane.org ([80.91.229.12]:57547) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NMQUv-0003b1-AA for emacs-orgmode@gnu.org; Sun, 20 Dec 2009 13:27:17 -0500 Received: from list by lo.gmane.org with local (Exim 4.50) id 1NMQUq-0004iR-6j for emacs-orgmode@gnu.org; Sun, 20 Dec 2009 19:27:12 +0100 Received: from ip116-027.hgracht.rwth-aachen.de ([134.130.116.27]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 20 Dec 2009 19:27:12 +0100 Received: from andrea.crotti.0 by ip116-027.hgracht.rwth-aachen.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 20 Dec 2009 19:27:12 +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: emacs-orgmode@gnu.org 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...