2016-02-27 04:13:00 +03:00
|
|
|
/- lens
|
|
|
|
!:
|
|
|
|
|_ com/command:lens
|
|
|
|
++ grab
|
|
|
|
|%
|
|
|
|
++ noun command:lens
|
|
|
|
++ json
|
|
|
|
|= jon/^json
|
|
|
|
^- command:lens
|
2016-05-04 02:26:52 +03:00
|
|
|
~| jon=jon
|
2016-02-27 04:13:00 +03:00
|
|
|
%- need
|
|
|
|
%. jon
|
|
|
|
=> [. jo]
|
|
|
|
=< %- ot :~
|
2016-03-09 04:19:28 +03:00
|
|
|
source+source
|
|
|
|
sink+sink
|
2016-02-27 04:13:00 +03:00
|
|
|
==
|
|
|
|
|%
|
|
|
|
++ source
|
|
|
|
^- $-(^json (unit source:lens))
|
2016-03-09 04:19:28 +03:00
|
|
|
|= jon/^json
|
2016-03-12 03:37:11 +03:00
|
|
|
=+ tuple=%.(jon (ar source))
|
|
|
|
?^ tuple
|
|
|
|
`[%tuple u.tuple]
|
2016-03-09 04:19:28 +03:00
|
|
|
%. jon
|
2016-02-27 04:13:00 +03:00
|
|
|
%- of :~
|
|
|
|
data+so:jo
|
|
|
|
dojo+so:jo
|
2016-03-08 01:06:17 +03:00
|
|
|
clay+so:jo
|
2016-02-27 04:13:00 +03:00
|
|
|
url+(su auri:urlp)
|
|
|
|
api+(su ;~(plug sym ;~(pfix col prn)))
|
2016-03-08 01:06:17 +03:00
|
|
|
:- %get-api
|
|
|
|
%- su
|
|
|
|
;~ plug
|
|
|
|
sym
|
|
|
|
;~(pfix col (more fas (cook crip (star ;~(less fas prn)))))
|
|
|
|
==
|
2016-02-27 04:13:00 +03:00
|
|
|
listen-api+(su ;~(plug sym ;~(pfix col sym)))
|
2016-03-09 04:19:28 +03:00
|
|
|
as+(ot mark+(su sym) next+source ~)
|
|
|
|
hoon+(ot code+so:jo next+source ~)
|
2016-02-27 04:13:00 +03:00
|
|
|
==
|
|
|
|
++ sink
|
|
|
|
^- $-(^json (unit sink:lens))
|
|
|
|
%- of :~
|
|
|
|
stdout+|=(^json (some ~))
|
|
|
|
output-file+so:jo
|
|
|
|
output-clay+(su (easy /sentinel/path))
|
|
|
|
url+(su auri:urlp)
|
|
|
|
to-api+(su ;~(plug sym ;~(pfix col prn)))
|
2016-03-09 04:19:28 +03:00
|
|
|
:- %send-api
|
|
|
|
%- su
|
|
|
|
;~ plug
|
|
|
|
sym
|
|
|
|
;~(pfix col (more fas (cook crip (star ;~(less fas prn)))))
|
|
|
|
==
|
2016-02-27 04:13:00 +03:00
|
|
|
command+so:jo
|
|
|
|
app+(su sym)
|
|
|
|
==
|
|
|
|
--
|
|
|
|
--
|
|
|
|
--
|