mirror of https://codeberg.org/cage/tinmop/
- improved error reporting in script 'generate-gemlog.lisp'.
This commit is contained in:
parent
416d9356e4
commit
5d3f6b69fe
|
@ -137,29 +137,35 @@
|
|||
(parse-gemini-file (fs:slurp-file a))
|
||||
(error (e)
|
||||
(notify
|
||||
"Unable to parse ~a: ~a"
|
||||
"Unable to parse ~a: ~a~%"
|
||||
a e)
|
||||
nil)))
|
||||
original-post-files))
|
||||
(all-meta (mapcar (lambda (a)
|
||||
(all-meta (mapcar (lambda (a file)
|
||||
(handler-case
|
||||
(let ((meta (extract-meta a)))
|
||||
meta)
|
||||
(if meta
|
||||
meta
|
||||
(progn
|
||||
(notify "Unable to find metadata for ~a~%"
|
||||
file)
|
||||
nil)))
|
||||
(error (e)
|
||||
(notify
|
||||
"Unable to parse meta ~a: ~a"
|
||||
a e)
|
||||
"Unable to parse metadata ~a: ~a~%"
|
||||
file e)
|
||||
nil)))
|
||||
parsed-posts)))
|
||||
parsed-posts
|
||||
original-post-files)))
|
||||
(loop for original-post-file in original-post-files
|
||||
for parsed-post in parsed-posts
|
||||
for meta in all-meta
|
||||
when (and parsed-post meta)
|
||||
collect
|
||||
(make-instance 'post
|
||||
:original-file-path original-post-file
|
||||
:content (extract-non-meta parsed-post)
|
||||
:meta meta))))
|
||||
collect
|
||||
(make-instance 'post
|
||||
:original-file-path original-post-file
|
||||
:content (extract-non-meta parsed-post)
|
||||
:meta meta))))
|
||||
|
||||
(defun post-topics (post)
|
||||
(with-accessors ((meta meta)) post
|
||||
|
|
Loading…
Reference in New Issue