summaryrefslogtreecommitdiffstats
path: root/site/snippets
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2013-01-11 01:28:51 +0100
committerGravatar Tom Willemsen2013-01-11 01:28:51 +0100
commita1bc3446052d9db34cdc86fe67807730c8d7efbe (patch)
tree6041128ae5c05bc5b7d19bf625031e140e9024bb /site/snippets
parentcaedd92eef8fe47c3925c12d8e81be911556b38b (diff)
downloadorgweb-a1bc3446052d9db34cdc86fe67807730c8d7efbe.tar.gz
orgweb-a1bc3446052d9db34cdc86fe67807730c8d7efbe.zip
Add "org-export.sh" snippet
Diffstat (limited to 'site/snippets')
-rw-r--r--site/snippets/org-export.org22
1 files changed, 22 insertions, 0 deletions
diff --git a/site/snippets/org-export.org b/site/snippets/org-export.org
new file mode 100644
index 0000000..568e7e0
--- /dev/null
+++ b/site/snippets/org-export.org
@@ -0,0 +1,22 @@
+#+TITLE: org-export
+#+OPTIONS: toc:nil
+
+* org-export
+
+ An ~about-filter~ for cgit using Emacs org-mode
+
+ #+BEGIN_SRC sh :tangle yes
+ #!/bin/sh
+
+ oname="`mktemp --suffix=.org`"
+ hname="${oname%.*}.html"
+
+ cat > "$oname"
+ emacs -Q -visit "$oname" -batch \
+ -l /usr/local/share/emacs/site-lisp/htmlize-1.39.el \
+ -eval "(let ((org-export-htmlize-output-type 'css))
+ (org-export-as-html 3 nil nil nil t))" \
+ 2> /dev/null
+ cat "$hname"
+ rm "$hname" "$oname"
+ #+END_SRC