summaryrefslogtreecommitdiff
path: root/app/mar/bill.hoon
diff options
context:
space:
mode:
authorpolwex <polwex@sortug.com>2025-10-06 01:01:41 +0700
committerpolwex <polwex@sortug.com>2025-10-06 01:01:41 +0700
commitc4b392a179048f936c062f5ffccc2bc25627e500 (patch)
tree09be0904be8ec4d7ea52992ef7580d42ed0c28c1 /app/mar/bill.hoon
working
Diffstat (limited to 'app/mar/bill.hoon')
-rw-r--r--app/mar/bill.hoon34
1 files changed, 34 insertions, 0 deletions
diff --git a/app/mar/bill.hoon b/app/mar/bill.hoon
new file mode 100644
index 0000000..76cef34
--- /dev/null
+++ b/app/mar/bill.hoon
@@ -0,0 +1,34 @@
+|_ bil=(list dude:gall)
+++ grow
+ |%
+ ++ mime `^mime`[/text/x-bill (as-octs:mimes:html hoon)]
+ ++ noun bil
+ ++ hoon
+ ^- @t
+ |^ (crip (of-wall:format (wrap-lines (spit-duz bil))))
+ ::
+ ++ wrap-lines
+ |= taz=wall
+ ^- wall
+ ?~ taz ["~"]~
+ :- (weld ":~ " i.taz)
+ %- snoc :_ "=="
+ (turn t.taz |=(t=tape (weld " " t)))
+ ::
+ ++ spit-duz
+ |= duz=(list dude:gall)
+ ^- wall
+ (turn duz |=(=dude:gall ['%' (trip dude)]))
+ --
+ ++ txt (to-wain:format hoon)
+ --
+++ grab
+ |%
+ ++ noun (list dude:gall)
+ ++ mime
+ |= [=mite len=@ud tex=@]
+ ~_ tex
+ !<((list dude:gall) (slap !>(~) (ream tex)))
+ --
+++ grad %noun
+--