3 ":"; exec emacs
--quick --script "$0" -- "$@" # -*- mode: emacs-lisp; lexical-binding: t; -*-
5 (add-to-list
'load-path "~/org-mode/lisp/")
7 (load
"/usr/share/emacs/site-lisp/elpa-src/htmlize-1.55/htmlize.el")
9 (setq make-backup-files nil
12 (setq org-confirm-babel-evaluate nil
13 org-html-style-default
""
15 org-html-htmlize-output-type
'css
16 org-html-doctype "html5"
17 org-html-html5-fancy t
18 org-html-validation-link nil
19 org-html-postamble nil)
21 (dolist (org-file (directory-files-recursively default-directory "\\.org$"))
22 (let ((html-file (concat (file-name-directory org-file)
23 (file-name-base org-file) ".html")))
24 (if (and (file-exists-p html-file)
25 (file-newer-than-file-p html-file org-file))
26 (message " [skipping] unchanged %s" org-file)
27 (message "[exporting] %s" (file-relative-name org-file default-directory))
28 (with-current-buffer (find-file org-file)
30 (org-html-export-to-html)
31 (error (message (error-message-string err))))))))