config.phundrak.com/export.el
Lucien Cartier-Tilet 0927a9911b
[CI] Use lighter Emacs image, remove validation links in HTML
The docker image used is now Emacs on Alpine, which should be lighter
than the previous one.

The validation link is also now disabled in HTML exports.
2020-09-03 12:52:27 +02:00

23 lines
793 B
EmacsLisp
Executable File

#!/usr/bin/emacs --script
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
(package-refresh-contents)
(package-install 'htmlize)
(package-install 's)
(require 's)
(setq org-confirm-babel-evaluate nil
org-html-validation-link nil)
(let* ((files (mapcar #'expand-file-name
(file-expand-wildcards "org/config/*.org"))))
(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))