-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconvertOrg
executable file
·61 lines (53 loc) · 1.02 KB
/
convertOrg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#! /bin/bash
usage()
{
cat << EOF
Exports org-mode files to other file formats
SYNOPSIS
$0 [-h] [-f <format>] files
OPTIONS:
-h Show this message
-f Set the format to export to.
Depending on the packages installed in emacs, format bay be one of
the following:
ascii
docbook
freemind
html
latex
latin1
odf
odt
org
pdf
taskjuggler
utf8
xoxo
EOF
}
FORMAT=pdf
while getopts "f: $*" OPTION
do
case $OPTION in
h)
shift;
usage
exit 1
;;
f)
shift;shift;
FORMAT=$OPTARG
;;
?)
shift;
usage
exit
;;
esac
done
f=""
for file in "$@"
do
f="${f} --visit ${file} --funcall org-export-as-$FORMAT"
done
emacs --batch --no-init-file --no-site-file $f