about summary refs log tree commit diff
path: root/users/sterni/mblog/cli.lisp
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2022-01-12T23·33+0100
committersterni <sternenseemann@systemli.org>2022-02-02T20·47+0000
commit56ec3b1803ed91b5b39ec001ff99d147d44f5e6d (patch)
treebb29e1e9a18b0750ad1dd52eeeee8b318b803816 /users/sterni/mblog/cli.lisp
parentd0e30ed23a53f965f3003d9aa7282190fe3df088 (diff)
refactor(sterni/mblog): add (sub)class for apple note messages r/3748
* Upon creation of an apple-note object we can check if certain fields
  we are interested in are present and of the right type etc.

  These currently are:

  - UUID (for links later)
  - Subject (title)
  - Time
  - Text part with supported MIME type

  These are then put into their own shortcut fields in the apple-note
  subclass which allows for easier access and forces us to make sure
  they are present.

* Split out everything note related into its own package. Using the new
  type, we can expose an interface which sort of makes sense.

Change-Id: Ic9d67518354e61a3cc8388bb0e566fce661e90d0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5072
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'users/sterni/mblog/cli.lisp')
-rw-r--r--users/sterni/mblog/cli.lisp5
1 files changed, 3 insertions, 2 deletions
diff --git a/users/sterni/mblog/cli.lisp b/users/sterni/mblog/cli.lisp
index 93be7e8b8e44..14c7adda28ed 100644
--- a/users/sterni/mblog/cli.lisp
+++ b/users/sterni/mblog/cli.lisp
@@ -13,5 +13,6 @@
                               args))))
     (if help-p (format *error-output* "Usage: ~A~%" +synopsis+)
       (loop for arg in args
-            do (apple-note-html-fragment
-                (mime:mime-message (pathname arg)) *standard-output*)))))
+            do (note:apple-note-html-fragment
+                (note:make-apple-note (mime:mime-message (pathname arg)))
+                *standard-output*)))))