From 8689a165c85528f8bd7f4a0c411340a1db611e29 Mon Sep 17 00:00:00 2001 From: Yaseen Date: Fri, 19 Nov 2021 14:49:49 -0500 Subject: [PATCH] base-dev: create story mark for storing commit messages --- pkg/base-dev/mar/story.hoon | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 pkg/base-dev/mar/story.hoon diff --git a/pkg/base-dev/mar/story.hoon b/pkg/base-dev/mar/story.hoon new file mode 100644 index 000000000..5b43a4eae --- /dev/null +++ b/pkg/base-dev/mar/story.hoon @@ -0,0 +1,21 @@ +|_ story=(map tako:clay [title=@t body=@t]) +++ grad %mime +:: +++ grow :: convert to + |% :: + ++ mime :: to %mime + [/text/x-urb-story (as-octs:mimes:html (of-wain:format txt))] + ++ txt + ^- wain + %+ turn ~(tap by story) + |= [chapter=[tak=tako:clay message=[title=@t body=@t]]] + =/ tak=tako:clay tak.chapter + =/ [title=@t body=@t] +.chapter + (crip "commit: {<`@uv`tak>}\0a\0a{(trip title)}\0a\0a{(trip body)}\0a---\0a") + -- +++ grab + |% :: convert from + ++ noun (map tako:clay ,[title=@t body=@t]) :: clam from %noun + ++ mime |=([p=mite q=octs] q.q) :: retrieve form %mime + -- +--