emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* batch exporting
@ 2009-12-20 18:26 andrea
  2009-12-20 19:09 ` Nick Dokos
  0 siblings, 1 reply; 10+ messages in thread
From: andrea @ 2009-12-20 18:26 UTC (permalink / raw)
  To: emacs-orgmode


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...

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

end of thread, other threads:[~2009-12-22  9:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-20 18:26 batch exporting andrea
2009-12-20 19:09 ` Nick Dokos
2009-12-20 22:43   ` andrea
2009-12-20 22:52     ` Carsten Dominik
2009-12-21  7:27       ` andrea
2009-12-21 10:25         ` andrea Crotti
2009-12-21 14:25         ` Nick Dokos
2009-12-21 14:51           ` andrea
2009-12-21 17:10             ` Nick Dokos
2009-12-22  9:20               ` andrea

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).