emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] batch exporting


From: andrea
Subject: [Orgmode] batch exporting
Date: Sun, 20 Dec 2009 19:26:48 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (darwin)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]