From 4c9bf1f48970cd6188093da1c85f8c6457af46a6 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Wed, 19 Aug 2015 21:37:09 -0400 Subject: [PATCH] works without frontend --- ape/talk.hoon | 3 +++ ape/work.hoon | 36 +++++++++++++++++++++++------------- mar/work/command.hoon | 28 +++++++++++++++++----------- sur/talk.hoon | 2 +- sur/work.hoon | 2 +- 5 files changed, 45 insertions(+), 26 deletions(-) diff --git a/ape/talk.hoon b/ape/talk.hoon index 25994856c..6bb906527 100644 --- a/ape/talk.hoon +++ b/ape/talk.hoon @@ -1677,6 +1677,9 @@ :: %app "[{(trip p.sep)}]: {(trip q.sep)}" + :: + %tax + == -- :: diff --git a/ape/work.hoon b/ape/work.hoon index 5d8cab262..b03e69aa7 100644 --- a/ape/work.hoon +++ b/ape/work.hoon @@ -1,3 +1,4 @@ +:: XX need to deal with versions and date modified :: :::: :: @@ -47,7 +48,7 @@ |- ^- (list thought) :_ ~ :+ (shaf %task eny) - [[[%& our %porch] [*envelope %pending]] ~ ~] + [[[%& our (main our)] [*envelope %pending]] ~ ~] [now *bouquet [%tax action]] == == @@ -89,8 +90,8 @@ :: ++ initialize ^- [(list move) _.] - :_ . :_ ~ - [ost %peer /peering [our %talk] /f/porch/0] + :_ .(connected %&) :_ ~ + [ost %peer /peering [our %talk] /f/(main our)/0] :: ++ process-duty |= [when=@da her=ship from=(set station:talk) action=duty:work-stuff:talk] @@ -98,10 +99,9 @@ =< mirror-to-web ?- -.action %create - :- ~ =+ existing-task=(~(get by tasks) id.p.action) ~? ?& ?=(^ existing-task) - !=(p.action u.existing-task) + !=(p.action task.u.existing-task) == :* %new-task-with-old-id her=her @@ -124,7 +124,7 @@ from=from action=action == - [~ +>.$] + +>.$ ?. =(version.action +(version.task.u.tax)) ~& :* %update-bad-version her @@ -132,7 +132,7 @@ action=action tax=tax == - [~ +>.$] + +>.$ =. tasks %^ ~(put by tasks) id.action ?: ?& ?=(?(%announce %release %accept) -.meat.action) @@ -166,10 +166,20 @@ :: ++ mirror-to-web ^- [(list move) _.] + ~& [%mirroring tasks=tasks sort=sort] :_ . - %+ turn (~(tap by sup)) - |= [ust=bone *] - [ust %diff %work-report tasks sort] + %+ murn (~(tap by sup)) + |= [ust=bone her=ship pax=path] + ^- (unit move) + ?: ?=([%sole *] pax) + ~ + `[ust %diff %work-report tasks sort] +:: +++ coup + |= [way=wire saw=(unit tang)] + ^- [(list move) _+>.$] + ?> ?=(~ saw) + [~ +>.$] :: ++ reap-peering |= [way=wire saw=(unit tang)] @@ -187,14 +197,14 @@ ?- -.cod %new abet:create:(at +.cod) %old abet:(process-update:(at (~(got by tasks) id.cod)) dif.cod) - %sort !! + %sort ~|(%not-implemented !!) == [(welp mos mof) +>.$] :: :: XX maybe need to check that we haven't received this message before :: by keeping a counter of last message received -++ diff-peering - |= [way=wire %talk-report rep=report] +++ diff-talk-report + |= [way=wire rep=report:talk] ^- [(list move) _+>.$] ?> ?=(%grams -.rep) |- ^- [(list move) _+>.^$] diff --git a/mar/work/command.hoon b/mar/work/command.hoon index 323412ba3..09e175a96 100644 --- a/mar/work/command.hoon +++ b/mar/work/command.hoon @@ -21,24 +21,29 @@ ++ ship (su fed:ag) ++ coma (of new/task old/(ot id/id dif/uppd ~) sort/(ar id) ~) ++ task - %- ot :~ - id/id date-created/di - version/ni date-modified/di - owner/ship status/(ci (soft status) so) - tags/(as so) due-date/(mu di) title/so - description/so discussion/(ar (ot date/di ship/ship body/so ~)) - == + %^ ot + :- %task + %- ot :~ + id/id date-created/di + version/ni date-modified/di + owner/ship status/(ci (soft status) so) + tags/(as so) date-due/(mu di) + done/(mu di) title/so + description/so discussion/(ar (ot date/di ship/ship body/so ~)) + == + audience/(as (ot ship/ship span/so ~)) + ~ ++ uppd %- of :~ own/(of announce/ul claim/ul ~) - add/(of comment/(ot date/di body/so ~) ~) + add/(of comment/so ~) :- %set %- of :~ - due-date/di + date-due/(mu di) title/so description/so tags/(as so) - done/(mu di) + done/bo audience/(as (ot ship/ship span/so ~)) == == @@ -57,7 +62,8 @@ :: owner:'fyr', :: status:'gave', :: tags:['tag'], -:: due-date:null, +:: date-due:null, +:: done:XX :: title:'Test task', :: description:'The converter owrks right?', :: discussion:[{date:1440011611215,ship:'sondel',body:'hi'}] diff --git a/sur/talk.hoon b/sur/talk.hoon index 09934cea0..57e9a3181 100644 --- a/sur/talk.hoon +++ b/sur/talk.hoon @@ -90,7 +90,7 @@ [%release p=ship] :: pass to new owner [%accept ~] :: accept pass [%delete ~] :: delete task - [%set-date-due p=@da] :: set due date + [%set-date-due p=(unit ,@da)] :: set due date [%set-tags p=(set ,@t)] :: set tags [%set-title p=@t] :: set title [%set-description p=@t] :: set description diff --git a/sur/work.hoon b/sur/work.hoon index 54c137b2b..498f3cc77 100644 --- a/sur/work.hoon +++ b/sur/work.hoon @@ -35,7 +35,7 @@ == ++ update $% $: %set - $% [%date-due p=@da] + $% [%date-due p=(unit ,@da)] [%title p=@t] [%description p=@t] [%tags p=(set ,@t)]