Add generators for easier webship ops.

This commit is contained in:
Fang 2017-12-12 21:23:00 +01:00
parent df66fb7a51
commit 2b1caa2b01
4 changed files with 54 additions and 1 deletions

View File

@ -164,6 +164,8 @@
++ poke-helm-nuke (wrap poke-nuke):from-helm ++ poke-helm-nuke (wrap poke-nuke):from-helm
++ poke-helm-begin (wrap poke-begin):from-helm ++ poke-helm-begin (wrap poke-begin):from-helm
++ poke-helm-spawn (wrap poke-spawn):from-helm ++ poke-helm-spawn (wrap poke-spawn):from-helm
++ poke-helm-tlon-add-stream (wrap poke-tlon-add-stream):from-helm
++ poke-helm-tlon-init-web (wrap poke-tlon-init-web):from-helm
++ poke-hood-sync (wrap poke-sync):from-kiln ++ poke-hood-sync (wrap poke-sync):from-kiln
++ poke-hood-init-sync (wrap poke-init-sync):from-kiln ++ poke-hood-init-sync (wrap poke-init-sync):from-kiln
++ poke-kiln-commit (wrap poke-commit):from-kiln ++ poke-kiln-commit (wrap poke-commit):from-kiln

View File

@ -0,0 +1,9 @@
:: tlon: add stream to local urbit-meta
::
:::: /gen/hood/tlon/add-stream/hoon
::
:- %say
|= $: {now/@da eny/@uvJ bec/beak}
{{web/ship $~} $~}
==
[%helm-tlon-add-stream web]

View File

@ -0,0 +1,9 @@
:: tlon: configure web ship
::
:::: /gen/hood/tlon/init-web/hoon
::
:- %say
|= $: {now/@da eny/@uvJ bec/beak}
{{met/ship $~} $~}
==
[%helm-tlon-init-web met]

View File

@ -2,7 +2,7 @@
:::: /hoon/helm/hood/lib :: :: :::: /hoon/helm/hood/lib :: ::
:: :: :: :: :: ::
/? 310 :: version /? 310 :: version
/- sole /- sole, hall
[. sole] [. sole]
:: :: :: :: :: ::
:::: :: :: :::: :: ::
@ -60,6 +60,8 @@
$% {$hood-unsync desk ship desk} :: $% {$hood-unsync desk ship desk} ::
{$ask-mail cord} :: {$ask-mail cord} ::
{$helm-hi cord} :: {$helm-hi cord} ::
{$drum-start well:gall} ::
{$hall-action action:hall} ::
== :: == ::
-- --
|_ moz/(list move) |_ moz/(list move)
@ -238,4 +240,35 @@
++ take-woot :: result of %want ++ take-woot :: result of %want
|= {way/wire her/ship cop/coop} =< abet |= {way/wire her/ship cop/coop} =< abet
(emit %flog ~ %text "woot: {<[way cop]>}") (emit %flog ~ %text "woot: {<[way cop]>}")
::
++ poke-tlon-init-web
|= met/ship =< abet
%- emil
%- flop
:~ ^- card
:^ %poke /helm/web/fora [our %hood]
[%drum-start q.byk %fora]
::
:^ %poke /helm/web/stream/create [our %hall]
:- %hall-action
:- %create
[%stream 'stream relay channel' %channel]
::
:^ %poke /helm/web/stream/filter [our %hall]
:- %hall-action
:- %filter
[%stream | |]
::
:^ %poke /helm/web/stream/source [our %hall]
:- %hall-action
:- %source
[%stream & [[[met %urbit-meta] `[da+(sub now ~d1) ~]] ~ ~]]
==
::
++ poke-tlon-add-stream
|= web/ship =< abet
%- emit
:^ %poke /helm/web/stream/source [our %hall]
:+ %hall-action %source
[%urbit-meta & [[[web %stream] `[da+now ~]] ~ ~]]
-- --