2021-10-23 18:15:44 +00:00
|
|
|
#!/usr/bin/env -S emacs -Q --script
|
2020-09-03 08:44:27 +00:00
|
|
|
(require 'package)
|
2021-10-23 18:15:44 +00:00
|
|
|
(require 'org)
|
|
|
|
(require 'ox-html)
|
|
|
|
(setq package-archives '(("melpa" . "https://melpa.org/packages/")))
|
2020-09-03 08:44:27 +00:00
|
|
|
(package-initialize)
|
|
|
|
(package-refresh-contents)
|
|
|
|
(package-install 'htmlize)
|
2020-09-03 10:52:27 +00:00
|
|
|
(setq org-confirm-babel-evaluate nil
|
|
|
|
org-html-validation-link nil)
|
2021-10-23 18:15:44 +00:00
|
|
|
(let ((files (mapcar #'expand-file-name
|
|
|
|
(file-expand-wildcards "org/config/*.org"))))
|
2020-09-03 08:44:27 +00:00
|
|
|
(mapc (lambda (file)
|
|
|
|
(message (format "==========\nExporting %S\n==========" file))
|
|
|
|
(with-current-buffer (find-file file)
|
|
|
|
(org-html-export-to-html)))
|
|
|
|
files))
|
|
|
|
(let* ((files (mapcar #'expand-file-name
|
|
|
|
(file-expand-wildcards "org/config/*.html~"))))
|
|
|
|
(mapc (lambda (file)
|
|
|
|
(delete-file file))
|
|
|
|
files))
|