diff --git a/arvo/ford.hoon b/arvo/ford.hoon index 17f1e8f278..740f2dd616 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -1047,7 +1047,10 @@ ?. ?=(%2 -.q.raf) (cope raf (flux |=(vax=vase (some [for vax])))) =- ((slog 0 (flop `tang`-)) (flue cof)) - ?^ t.pax ~ :: error on top-level marks + =+ (lent t.pax) + ?: ?~ - | :: error if level above built + (~(has by res) (tack i.pax (scag (dec -) t.pax))) + ~ :_(q.q.raf leaf/"! {<`mark`for>} build failed, ignoring.") -- :: diff --git a/mar/work/task.hoon b/mar/work/task.hoon new file mode 100644 index 0000000000..070a9969d5 --- /dev/null +++ b/mar/work/task.hoon @@ -0,0 +1,117 @@ +:: +:::: /hoon/task/work/mar + :: +/- *work +!: +:::: + :: +|% +++ rend + |= a=(list $|(char dime)) ^- cord + %- crip + |- ^- tape + ?~ a ~ + ?@ i.a [i.a $(a t.a)] + (weld (scow i.a) $(a t.a)) +:: +++ indent |=(a=wain (turn a |=(b=cord (cat 3 ' ' b)))) +:: +++ undent + |* [a=wain b=$+(wain *)] ^+ [*b a] + =^ c a + |- ^- [c=wain a=wain] + ?~ a [~ a] + ?. =(' ' (end 3 2 i.a)) + [~ a] + [[- c] a]:[(rsh 3 2 i.a) $(a t.a)] + [(b `wain`c) a] +++ keen |*(_[a=,* b=rule] |=(c=nail `(like a)`(b c))) +++ parse + |* [hed=?(~ $|(@tas tape)) tal=(pole)] + ?~ hed (..$ tal) + ?^ hed ;~(pfix (just (crip hed)) (..$ tal)) + =- ?~(tal had ;~(plug had (..$ tal))) + =< had=(sear . nuck:so) + |= a=coin ^- (unit (odo:raid hed)) + ?. &(?=([%$ @ @] a) =(hed p.p.a)) ~ + (some q.p.a) +:: +++ advance + |* [a=wain b=_rule] ^+ [(wonk *b) a] + ?~(a !! ~|(i.a [(rash i.a b) t.a])) +-- +!: +:::: + :: +|_ taz=task +++ grab + |% ++ txt + |= a=wain ^+ taz + =+ ~[id=%uw "_" date-created=%da " " version=%ud date-modified=%da] + =^ b a (advance a ;~(plug (parse -) (punt (parse " " %da ~)))) + =+ [-.b `due-date=(unit ,@da)`+.b] + =^ tags a (undent a ~(gas in *(set cord))) + =^ title a ?~(a !! a) + =^ b a (advance a (parse owner=%p "." status=%tas ~)) + ?> ?=(status.task status.b) + =+ b + =^ description a (undent a role) + :* id date-created version date-modified + owner status tags due-date title description + |- ^- (list comment) + ?: =(~ a) ~ + =^ b a (advance a (parse ship=%p " " date=%da ~)) + =+ b + =^ body a (undent a role) + [[date ship body] $] + == + -- +++ grow + |% + ++ elem ;pre: {(zing `wall`(turn (wash 0^120 >taz<) |=(a=tape ['\0a' a])))} + ++ txt + =+ taz + =+ due=?~(due-date ~ ~[' ' da/u.due-date]) + :- (rend uw/id '_' da/date-created ' ' ud/version da/date-modified due) + %+ welp (indent (sort (~(tap in tags)) aor)) + :- title + :- (rend p/owner '.' tas/status ~) + %- zing ^- (list wain) + :- (indent (lore description)) + %+ turn discussion + |= comment ^- wain + [(rend p/ship ' ' da/date ~) (indent (lore body))] + ++ json + =+ taz + %- jobe :~ id/(jape ) + tags/[%a (turn (~(tap in tags)) |=(a=cord s/a))] + owner/(jape ) + status/(jape ) + title/[%s title] + version/(jape ) + date-created/(jode date-created) + date-modified/(jode date-modified) + description/[%s description] + =< discussion/[%a (turn discussion .)] + |=(comment (jobe date/(jode date) ship/(jape ) body/[%s body] ~)) + due-date/?~(due-date ~ (jode u.due-date)) + == + -- +++ grad %txt +-- +:: {id}_{date-created} {version}{date-modified}{|(" {due-date}" ~)} +:: {tag1} +:: {tag2} +:: ... +:: {title} +:: {owner}.{status} +:: {description} +:: {more description} +:: {ship1} {date} +:: {comment} +:: {more comment} +:: {more comment} +:: {ship2} {date} +:: {comment} +:: {more comment} +:: {more comment} diff --git a/pub/work/test.work-task b/pub/work/test.work-task new file mode 100644 index 0000000000..f7a6166360 --- /dev/null +++ b/pub/work/test.work-task @@ -0,0 +1,7 @@ +0w0_~1999.1.1 2~1999.1.2 ~1999.5.20 +Yoooo +~fyr.gave + Testin +~doznec ~2015.1.3 + how long has + this been around? diff --git a/sur/work.hoon b/sur/work.hoon index bba12ab8c7..88b1951ce7 100644 --- a/sur/work.hoon +++ b/sur/work.hoon @@ -1,11 +1,12 @@ +/- talk |% ++ client - $: tasks=(map @uwH client-task) - sort=(list @uwH) + $: tasks=(map ,@uwH client-task) + sort=(list ,@uwH) == ++ client-task $: task=task - audience=(set station) + audience=(set station:talk) == ++ task $: id=@uwH @@ -14,8 +15,8 @@ date-modified=@da owner=@p status=status - tags=(set @t) - due-date=@da + tags=(set ,@t) + due-date=(unit ,@da) title=@t description=@t discussion=(list comment)