tvl-depot/users/sterni/mblog/packages.lisp
sterni 98e4cd032f feat(users/sterni/mblog): implement mblog executable
This change finally sort of puts the parts together: We take a maildir,
render all its note messages as standalone HTML, extract the attachments
alongside and finally generate a global index page linking all notes.

The new executable and mnote-html are both contained in the same image
and we dispatch the right functionality based on argv[0].

Change-Id: I5a5bdbfaca79199f92e73ea4a2f070fa900d2bc4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5113
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2022-02-02 20:47:45 +00:00

51 lines
983 B
Common Lisp

(defpackage :maildir
(:use :common-lisp)
(:shadow :list)
(:export :list)
(:documentation
"Very incomplete package for dealing with maildir(5)."))
(defpackage :note
(:use
:common-lisp
:babel
:babel-encodings
:closure-html
:cl-date-time-parser
:mime4cl)
(:import-from
:alexandria
:when-let*
:when-let
:starts-with-subseq
:ends-with-subseq)
(:import-from :who :escape-char-minimal)
(:export
:apple-note
:apple-note-uuid
:apple-note-subject
:apple-note-time
:apple-note-text-part
:make-apple-note
:apple-note-html-fragment))
(defpackage :mblog
(:use
:common-lisp
:klatre
:who
:maildir
:note)
(:export :build-mblog)
(:import-from :local-time :universal-to-timestamp)
(:import-from :sclf :pathname-as-directory)
(:shadowing-import-from :common-lisp :list))
(defpackage :cli
(:use
:common-lisp
:uiop
:note
:mblog)
(:import-from :alexandria :starts-with)
(:export :main))