2021-10-23 18:15:44 +00:00
|
|
|
#!/usr/bin/env -S emacs -Q --script
|
2021-11-22 16:17:06 +00:00
|
|
|
|
2020-09-03 08:44:27 +00:00
|
|
|
(require 'package)
|
2021-10-23 18:15:44 +00:00
|
|
|
(require 'org)
|
|
|
|
(require 'ox-html)
|
2021-11-22 16:17:06 +00:00
|
|
|
|
2021-10-23 18:15:44 +00:00
|
|
|
(setq package-archives '(("melpa" . "https://melpa.org/packages/")))
|
2020-09-03 08:44:27 +00:00
|
|
|
(package-initialize)
|
|
|
|
(package-refresh-contents)
|
|
|
|
(package-install 'htmlize)
|
2021-11-22 16:17:06 +00:00
|
|
|
|
2020-09-03 10:52:27 +00:00
|
|
|
(setq org-confirm-babel-evaluate nil
|
2021-11-28 21:47:27 +00:00
|
|
|
org-html-validation-link nil
|
|
|
|
make-backup-files nil)
|
2021-11-22 16:17:06 +00:00
|
|
|
|
|
|
|
(defun export-and-clean (directory)
|
|
|
|
(progn (mapc (lambda (file)
|
2021-11-28 21:47:27 +00:00
|
|
|
(progn (message (concat "=====================\n"
|
2021-11-22 16:17:06 +00:00
|
|
|
"Exporting "
|
|
|
|
file
|
|
|
|
"\n"
|
2021-11-28 21:47:27 +00:00
|
|
|
"=====================\n"))
|
2021-11-22 16:17:06 +00:00
|
|
|
(with-current-buffer (find-file file)
|
|
|
|
(org-html-export-to-html))))
|
2021-11-28 21:47:27 +00:00
|
|
|
(directory-files directory t (regexp-quote ".org")))))
|
2021-11-22 16:17:06 +00:00
|
|
|
|
|
|
|
(dolist (dir '("org/config/" "org/config/Deprecated/" "org/config/WIP"))
|
|
|
|
(export-and-clean dir))
|