Add "org-export.sh" snippet
This commit is contained in:
parent
caedd92eef
commit
a1bc344605
2 changed files with 26 additions and 0 deletions
|
@ -36,3 +36,7 @@
|
||||||
changes to a file.
|
changes to a file.
|
||||||
- [[file:projects/gitto.org][gitto]] :: A utility for keeping track of my git repositories'
|
- [[file:projects/gitto.org][gitto]] :: A utility for keeping track of my git repositories'
|
||||||
status.
|
status.
|
||||||
|
|
||||||
|
* Snippets
|
||||||
|
|
||||||
|
[[file:snippets/org-export.org][org-export]]
|
||||||
|
|
22
site/snippets/org-export.org
Normal file
22
site/snippets/org-export.org
Normal file
|
@ -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
|
Loading…
Reference in a new issue