From cf5a8c79c2ec66aa127c737c3a76b647f5590386 Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Wed, 16 Sep 2015 15:51:31 -0700 Subject: [PATCH] fix tree, per-day talk output format, rendering --- ape/talk.hoon | 13 +++++-------- arvo/ford.hoon | 10 +++++----- gen/tree.hoon | 4 ++-- pub/talklog/hymn.hook | 7 ++++++- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/ape/talk.hoon b/ape/talk.hoon index ccb897ca3..1fd6efed4 100644 --- a/ape/talk.hoon +++ b/ape/talk.hoon @@ -1791,10 +1791,10 @@ ++ log-to-file |= man=span ^- move - =+ =+ =+ (yore now.hid) - %^ cat 3 man - `@t`(rsh 3 2 (scot %ui :(add d.t (mul 100 m) (mul 10.000 y)))) - paf=/(scot %p our.hid)/home/(scot %da now.hid)/talk/[-]/talk-telegrams + =+ ^- paf=path + =+ day=(year %*(. (yore now.hid) +.t +:*tarp)) + %+ tope [our.hid %home da/now.hid] + /talk-telegrams/(scot %da day)/[man]/talk =+ grams:(~(got by stories) man) [ost.hid %info /jamfile our.hid (foal paf [%talk-telegrams !>(-)])] :: @@ -1810,10 +1810,7 @@ =+ ^= grams %- (hard (list telegram)) .^ %cx - =+ =+ (yore now.hid) - %^ cat 3 man - `@t`(rsh 3 2 (scot %ui :(add d.t (mul 100 m) (mul 10.000 y)))) - /(scot %p our.hid)/home/(scot %da now.hid)/talk/[-]/talk-telegrams + /(scot %p our.hid)/home/(scot %da now.hid)/talk/[man]/talk-telegrams == =+ toy=(~(got by stories) man) [~ +>.$(stories (~(put by stories) man toy(grams grams, count (lent grams))))] diff --git a/arvo/ford.hoon b/arvo/ford.hoon index aff8b8c2d..75a622e5e 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -1495,17 +1495,17 @@ |= [cof=cafe bax=vase doe=term hon=horn] ^- (bolt vase) %+ cope (lash cof how (flux (slat doe))) - |= [cof=cafe yep=(map ,@ span)] - =+ ^= poy ^- (list (pair ,@ span)) + |= [cof=cafe yep=(map span ,@)] + =+ ^= poy ^- (list (pair span ,@)) %+ sort (~(tap by yep) ~) - |=([a=[@ *] b=[@ *]] (lth -.a -.b)) + |=([[* a=@] [* b=@]] (lth a b)) %+ cope |- ^- (bolt (list (pair ,@ vase))) ?~ poy (flue cof) %+ cope $(poy t.poy) |= [cof=cafe nex=(list (pair ,@ vase))] - %+ cope (chap(s.how [q.i.poy s.how]) cof bax hon) - (flux |=(elt=vase [[p.i.poy elt] nex])) + %+ cope (chap(s.how [p.i.poy s.how]) cof bax hon) + (flux |=(elt=vase [[q.i.poy elt] nex])) %- flux |= yal=(list (pair ,@ vase)) ^- vase ?~ yal [[%cube 0 [%atom %n]] 0] diff --git a/gen/tree.hoon b/gen/tree.hoon index 5dadf46b0..94cfc6c6b 100644 --- a/gen/tree.hoon +++ b/gen/tree.hoon @@ -12,10 +12,10 @@ :- %tang %- flop |- ^- tang =+ ark=;;(arch .^(cy/pax)) -=- ?~ q.ark - +=- ?~ fil.ark - [(rend pax) -] %- zing %+ turn - (sort (~(tap by r.ark)) aor) + (sort (~(tap by dir.ark)) aor) |= [a=@t ~] ^$(pax (welp pax /[a])) diff --git a/pub/talklog/hymn.hook b/pub/talklog/hymn.hook index 7067130d2..e8648aca9 100644 --- a/pub/talklog/hymn.hook +++ b/pub/talklog/hymn.hook @@ -3,7 +3,12 @@ :::: /hook/hymn/talklog/pub :: /? 310 -/= mez /: /===/talk /% /; pojo /json/ +/= mez + /: /===/talk + /% 2 + /; pojo + /; |=(a=(list ,[@ p=json]) =.(a (flop a) ?~(a [%a ~] p.i.a))) + /& /json/ |% ++ cdnj |=(a=tape ;script(src "//cdnjs.cloudflare.com/ajax/libs/{a}");) --