mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-01 19:46:36 +03:00
base-dev: create story mark for storing commit messages
This commit is contained in:
parent
8819d61ff6
commit
8689a165c8
21
pkg/base-dev/mar/story.hoon
Normal file
21
pkg/base-dev/mar/story.hoon
Normal file
@ -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
|
||||
--
|
||||
--
|
Loading…
Reference in New Issue
Block a user