shrub/app/mark-dashboard.hoon

79 lines
1.6 KiB
Plaintext
Raw Normal View History

|%
++ results (map mark (each vase tang))
++ show-results
2017-02-14 01:57:07 +03:00
=, format
|= a/results ^- json
:- %o
%- ~(run by a)
|= b/(each vase tang)
?- -.b
2017-02-14 01:57:07 +03:00
$& (tape:enjs (text p.b))
$| (tape:enjs (of-wall (wush 160 (flop p.b))))
==
++ wush
|= {wid/@u tan/tang} ^- wall
(zing (turn tan |=(a/tank (wash 0^wid a))))
--
::
2017-02-14 01:57:07 +03:00
=, gall
=, ford
2016-11-17 02:05:24 +03:00
|_ {bowl $~}
++ peek _~
++ peer-scry-x
|= path
[[ost %exec /all-marks our `build-marks]~ +>]
::
++ made-all-marks
|= {path @uvH a/gage}
:_ +>.$
?> ?=($tabl -.a)
=; res/results
[ost %diff [%json (show-results res)]]~
%- malt
%+ turn p.a
|= {k/gage v/gage} ^- {mark (each vase tang)}
:- ?>(?=({$& $mark * @tas} k) q.q.p.k)
?- -.v
$tabl !!
$& [%& q.p.v]
$| v
==
::
++ build-marks
^- {beak silk}
:- now-beak
:- %tabl
2017-02-14 01:58:55 +03:00
%+ turn (weld list-marks list-sub-marks)
|= {a/mark $~} ^- {silk silk}
:- [%$ %mark !>(a)]
[%bunt a]
2016-11-17 02:05:24 +03:00
::
++ poke-noun
|= *
~& have+list-marks
`+>
::
++ now-beak %_(byk r [%da now])
2016-11-17 02:05:24 +03:00
++ list-marks
=, space:userlib
=, format
=+ .^(arch %cy (en-beam now-beak /mar))
%+ skim ~(tap by dir)
|= {a/mark $~}
?=(^ (file (en-beam now-beak /hoon/[a]/mar)))
2017-02-14 01:58:55 +03:00
::
++ list-sub-marks
=, space:userlib
=, format
^- (list {mark $~})
%- zing ^- (list (list {mark $~}))
=/ top .^(arch %cy (en-beam now-beak /mar))
%+ turn ~(tap by dir.top)
2017-02-14 01:58:55 +03:00
|= {sub/knot $~}
=+ .^(arch %cy (en-beam now-beak /[sub]/mar))
%+ murn ~(tap by dir)
2017-02-14 01:58:55 +03:00
|= {a/mark $~} ^- (unit {mark $~})
?~ (file (en-beam now-beak /hoon/[a]/[sub]/mar)) ~
`[(rap 3 sub '-' a ~) ~]
--