view weave.sh @ 7:ce96610fe058

perl script is amazing
author Robert McIntyre <rlm@mit.edu>
date Mon, 24 Oct 2011 09:41:38 -0700
parents 5370428e673e
children 73beed20f7de
line wrap: on
line source
1 #!/bin/sh
3 # assumes ./org directory with org files to publish to
4 # ./html
6 target=$(readlink -f $1)
8 org=`dirname $target`
10 dir=`dirname $org`
12 emacsclient \
13 --eval "
14 (progn
15 (setq org-publish-project-alist
16 '(
17 (\"project\"
18 :base-directory \"$dir/org\"
19 :base-extension \"org\"
20 :publishing-directory \"$dir/html\"
21 :recursive t
22 :publishing-function org-publish-org-to-html
23 :auto-preamble t)
24 ))
26 (org-publish-file \"$target\" '(\"project\"
27 :base-directory \"$dir/org\"
28 :base-extension \"org\"
29 :publishing-directory \"$dir/html\"
30 :recursive t
31 :publishing-function org-publish-org-to-html
32 :auto-preamble t)
33 ))" \
34 \
35 2>&1 #| pcregrep 'Wrote'