mirror of
https://github.com/urbit/shrub.git
synced 2025-01-05 19:46:50 +03:00
|schedule add to .sched
Demo suggestion: - vim :set autoread, :e pier/home/pub/test.sched (TODO: rename) - http://zod.local/home/pub/test -- ordered - add an element in vim -- still ordered - +cat %/pub/test -- data structure, hash order - |schedule %/pub/test ~2016.5.5..07.30.00 'new event' -- vim now ordered, reloaded alongside web - +cat it again for good measure?
This commit is contained in:
parent
8a8055ba3a
commit
60f5becaa7
@ -88,6 +88,7 @@
|
||||
++ poke-kiln-cp (wrap poke-cp):from-kiln
|
||||
++ poke-kiln-rm (wrap poke-rm):from-kiln
|
||||
++ poke-kiln-mv (wrap poke-mv):from-kiln
|
||||
++ poke-kiln-schedule (wrap poke-schedule):from-kiln
|
||||
++ poke-will (wrap poke-will):from-helm
|
||||
++ mere-kiln (wrap take-mere):from-kiln
|
||||
++ mere-kiln-sync (wrap take-mere-sync):from-kiln
|
||||
|
@ -820,6 +820,8 @@
|
||||
++ keel :: apply mutations
|
||||
|= [cof=cafe suh=vase yom=(list (pair wing vase))]
|
||||
^- (bolt vase)
|
||||
%+ cool => |=([a=wing b=type *] [a b])
|
||||
|.(leaf/"ford: keel {<p.suh>} {<(turn yom +)>}")
|
||||
%^ maim cof
|
||||
%+ slop suh
|
||||
|- ^- vase
|
||||
@ -960,8 +962,8 @@
|
||||
=* for p.i.all
|
||||
=+ raf=(fang cof for)
|
||||
?: ?=(%2 -.q.raf)
|
||||
%- (slog 0 leaf/"! {<`mark`for>} build failed, ignoring:" q.q.raf)
|
||||
(fine cof lil)
|
||||
=. q.q.raf :_(q.q.raf leaf/"! {<`mark`for>} build failed, ignoring.")
|
||||
((slog 0 (flop q.q.raf)) (fine cof lil))
|
||||
%+ cope `(bolt vase)`raf
|
||||
|= [cof=cafe vax=vase]
|
||||
%+ fine cof
|
||||
@ -1023,11 +1025,12 @@
|
||||
++ link :: translate
|
||||
|= [cof=cafe too=mark for=mark vax=vase]
|
||||
^- (bolt vase)
|
||||
:: %+ cool |.(leaf/"ford: link {<too>} {<for>} {<p.vax>}")
|
||||
?: =(too for) (fine cof vax)
|
||||
?: |(=(%noun for) =(%$ for))
|
||||
((lake too) cof vax)
|
||||
%+ cope (fang cof for)
|
||||
|= [cof=cafe pro=vase]
|
||||
|= [cof=cafe pro=vase] ^- (bolt vase)
|
||||
?: &((slob %grow p.pro) (slob too p:(slap pro [%cnzy %grow])))
|
||||
%+ cope (keel cof pro [[%& 6]~ vax]~)
|
||||
|= [cof=cafe pox=vase]
|
||||
|
@ -1030,7 +1030,8 @@
|
||||
=+ dir=((hard arch) .^(%cy pax))
|
||||
?~ q.dir [%ins val]
|
||||
=+ for=((hard mark) -:(flop pax))
|
||||
[%mut [for [%atom %$] .^(%cx pax)] val]
|
||||
?> =(for p.val)
|
||||
[%mut [for p.q.val .^(%cx pax)] val]
|
||||
::
|
||||
++ file :: simple file load
|
||||
|= pax=path
|
||||
|
1
base/cat/hood/schedule.hoon
Normal file
1
base/cat/hood/schedule.hoon
Normal file
@ -0,0 +1 @@
|
||||
|=([^ [where=path tym=@da eve=@t ~] ~] kiln-schedule/[where tym eve])
|
@ -101,23 +101,30 @@
|
||||
abet:abet:(merge:(work syd) ali sud gim)
|
||||
::
|
||||
++ do-info
|
||||
|= [mez=tape pax=path tor=toro]
|
||||
|= [mez=tape tor=toro]
|
||||
abet:(emit:(spam leaf/mez ~) %info /kiln our tor)
|
||||
::
|
||||
++ poke-rm |=(a=path (do-info "removed" a (fray a)))
|
||||
++ poke-rm |=(a=path (do-info "removed" (fray a)))
|
||||
++ poke-cp
|
||||
|= [input=path output=path]
|
||||
%^ do-info "copied" input
|
||||
%+ do-info "copied"
|
||||
?> =(-:(flop input) -:(flop output))
|
||||
(foal output -:(flop input) %noun .^(%cx input)) :: XX type
|
||||
::
|
||||
++ poke-mv
|
||||
|= [input=path output=path]
|
||||
%^ do-info "moved" input
|
||||
%+ do-info "moved"
|
||||
?> =(-:(flop input) -:(flop output))
|
||||
%+ furl (fray output)
|
||||
(foal output -:(flop input) %noun .^(%cx input))
|
||||
::
|
||||
++ poke-schedule
|
||||
|= [where=path tym=@da eve=@t]
|
||||
=. where (welp where /sched)
|
||||
%+ do-info "scheduled"
|
||||
=+ old=;;((map ,@da cord) (fall (file where) ~))
|
||||
(foal where %sched !>((~(put by old) tym eve)))
|
||||
::
|
||||
++ take |=(way=wire ?>(?=([@ ~] way) (work i.way))) :: general handler
|
||||
++ take-mere ::
|
||||
|= [way=wire are=(each (set path) (pair term tang))]
|
||||
|
@ -3,7 +3,7 @@
|
||||
::
|
||||
|_ dat=(map ,@da cord)
|
||||
++ grow :: convert to
|
||||
|% ++ mime `^mime`[/text/x-sched (tact tape)]
|
||||
|% ++ mime [/text/x-sched (tact tape)]
|
||||
++ tape
|
||||
(zing `wall`(turn sorted-list |=([a=@da b=cord] "{<a>} {(trip b)}\0a")))
|
||||
++ elem =< ;list: *{(turn sorted-list .)}
|
||||
|
Loading…
Reference in New Issue
Block a user