1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2025-02-23 09:07:37 +01:00

- [script] [generate-gemlog] added command line switch to force publishing of posts.

This commit is contained in:
cage 2024-12-28 11:51:00 +01:00
parent 23874c00b4
commit 995e69b8e0

View File

@ -156,6 +156,8 @@
(defparameter *indices-home-backlink-name* (defparameter *indices-home-backlink-name*
(getenv +environment-variable-gemlog-indices-home-backlink-name+ "home")) (getenv +environment-variable-gemlog-indices-home-backlink-name+ "home"))
(defparameter *force-publish* nil)
(defun parse-date (timestring) (defun parse-date (timestring)
(local-time:parse-timestring timestring)) (local-time:parse-timestring timestring))
@ -328,7 +330,8 @@
(cond (cond
((cdr (assoc +meta-skip-p+ (meta post))) ((cdr (assoc +meta-skip-p+ (meta post)))
(format t "skipping ~a as instructed by metadata.~%" file-path)) (format t "skipping ~a as instructed by metadata.~%" file-path))
((fs:file-exists-p file-path) ((and (fs:file-exists-p file-path)
(not *force-publish*))
(push post effective-posts) (push post effective-posts)
(setf (archive-file-path post) file-path)) (setf (archive-file-path post) file-path))
(t (t
@ -526,6 +529,10 @@
(finish-output) (finish-output)
(read-line)) (read-line))
(when (string= (first command-line:*free-arguments*)
"force")
(setf *force-publish* t))
(if (ui:tui-active-p) (if (ui:tui-active-p)
(generate-on-tui) (generate-on-tui)
(let* ((bulk-posts-dir (or (getenv +environment-variable-gemlog-posts-archive+ nil) (let* ((bulk-posts-dir (or (getenv +environment-variable-gemlog-posts-archive+ nil)