dotfiles/export.el
Lucien Cartier-Tilet fd5019335d
All checks were successful
continuous-integration/drone/push Build is passing
[Misc] Fix drone CI
2021-10-23 21:05:17 +02:00

23 lines
793 B
EmacsLisp
Executable File

#!/usr/bin/env -S emacs -Q --script
(require 'package)
(require 'org)
(require 'ox-html)
(setq package-archives '(("melpa" . "https://melpa.org/packages/")))
(package-initialize)
(package-refresh-contents)
(package-install 'htmlize)
(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))