shrub/mar/hall/command.hoon

41 lines
1016 B
Plaintext
Raw Normal View History

2014-12-06 04:18:31 +03:00
::
:::: /mar/hall/command/hoon
2014-12-06 04:18:31 +03:00
::
2016-02-18 02:00:12 +03:00
/? 310
/- hall
/+ hall-json
2016-11-17 04:42:58 +03:00
::
=, hall
2016-01-31 06:37:03 +03:00
|_ cod/command
2014-12-06 04:18:31 +03:00
::
++ grab :: convert from
|%
2017-10-12 13:30:16 +03:00
++ noun command :: from %noun
2017-12-16 18:26:55 +03:00
++ json :: from %json
=, dejs:hall-json
2017-12-16 18:26:55 +03:00
=, dejs-soft:format
|= a/json
^- command:hall
=- (need ((of -) a))
:~ publish+(ar thot)
present+(ot nos+(as so) dif+disa ~)
:: bearing not needed
==
--
::
++ grow :: convert to
|%
++ json :: to %json
=, enjs:hall-json
2017-12-16 18:26:55 +03:00
=, enjs:format
%+ frond -.cod
:: only %publish has just a single piece of data.
?: ?=($publish -.cod) a+(turn tos.cod thot)
%- pairs
?+ -.cod !!
$present ~[nos+(sa nos.cod cord:enjs:hall-json) dif+(disa dif.cod)]
:: bearing nto needed
==
2014-12-06 04:18:31 +03:00
--
2017-10-12 13:30:16 +03:00
--