mirror of
https://github.com/urbit/shrub.git
synced 2024-12-04 23:04:24 +03:00
demo sched mark
This commit is contained in:
parent
b845051bf6
commit
8a8055ba3a
@ -8,12 +8,14 @@
|
||||
::::
|
||||
::
|
||||
|= [^ [arg=(list path)] ~]
|
||||
=- tang/(flop (zing -))
|
||||
=- tang/(flop `tang`(zing -))
|
||||
%+ turn arg
|
||||
|= pax=path
|
||||
^- tang
|
||||
=+ ark=;;(arch .^(%cy pax))
|
||||
?^ q.ark
|
||||
?: =(%sched -:(flop pax))
|
||||
[>;;((map ,@da cord) .^(%cx pax))<]~
|
||||
[leaf/(spud pax) (pretty-file .^(%cx pax))]
|
||||
?- r.ark :: handle ambiguity
|
||||
~
|
||||
|
29
base/mar/sched.hoon
Normal file
29
base/mar/sched.hoon
Normal file
@ -0,0 +1,29 @@
|
||||
!:
|
||||
:::: /hoon/core/sched/mar
|
||||
::
|
||||
|_ dat=(map ,@da cord)
|
||||
++ grow :: convert to
|
||||
|% ++ mime `^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 .)}
|
||||
|= [tym=@da ite=cord] ^- manx
|
||||
;li: ;{b "{<tym>}"}: {(trip ite)}
|
||||
++ sorted-list
|
||||
(sort (~(tap by dat)) |=([[l=@ @] [r=@ @]] (lth l r)))
|
||||
--
|
||||
++ grab
|
||||
|% :: convert from
|
||||
++ mime
|
||||
|= [p=mite q=octs] ^+ dat
|
||||
=< (mo (turn (lore q.q) .))
|
||||
|= a=@t ^- [@da @t]
|
||||
%+ rash a
|
||||
;~ (glue ace)
|
||||
(cook |=(a=coin ?>(?=([~ %da @] a) `@da`q.p.a)) nuck:so)
|
||||
(cook crip (star prn))
|
||||
==
|
||||
--
|
||||
++ grad |%
|
||||
++ sted %mime
|
||||
-- --
|
3
base/pub/test.sched
Normal file
3
base/pub/test.sched
Normal file
@ -0,0 +1,3 @@
|
||||
~1970.1.1 Hello world
|
||||
~1970.2.1 Hallo world?
|
||||
~1970.1.2 Reordered for goo reason
|
Loading…
Reference in New Issue
Block a user