LoginSignup
10
10

More than 5 years have passed since last update.

.orgをシェルからHTML出力

Posted at

Emacsのorg-modeのファイルをHTMLに出力したい。けど、ちょうどEmacsを起動してなかった...て時のため。
--batchなんて滅多に使わないからメモメモ

対象ファイルはagenda.org

emacs --batch --visit='agenda.org' --funcall 'org-export-as-html-batch'

~/public_html/においてcgiとかにするなら、

agenda.cgi
#!/bin/tcsh
cd ~/.org/
emacs --batch --visit='agenda.org' --funcall 'org-export-as-html-batch' >& /dev/null
echo "Content-type: text/html"
echo ""

cat agenda.html

といった感じ?

org-captureしたはいいけどhtmlに出力するの忘れてた...ってときがよくあったので。
いや、org-captureしたときにフックしろよって言われればそれまでですが...

10
10
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
10