Separate the Tlon ops generators to allow more granular control over stream & fora sources.

This commit is contained in:
Fang 2018-01-05 20:19:34 +01:00
parent 6b11489c54
commit f5628c1dad
6 changed files with 47 additions and 14 deletions

View File

@ -164,8 +164,9 @@
++ poke-helm-nuke (wrap poke-nuke):from-helm
++ poke-helm-begin (wrap poke-begin):from-helm
++ poke-helm-spawn (wrap poke-spawn):from-helm
++ poke-helm-tlon-add-fora (wrap poke-tlon-add-fora):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-helm-tlon-init-stream (wrap poke-tlon-init-stream):from-helm
++ poke-hood-sync (wrap poke-sync):from-kiln
++ poke-hood-init-sync (wrap poke-init-sync):from-kiln
++ poke-kiln-commit (wrap poke-commit):from-kiln

View File

@ -0,0 +1,11 @@
:: tlon: add fora notifications to local urbit-meta
::
:: make the local urbit-meta pull from {for}'s fora notification channels.
::
:::: /gen/hood/tlon/add-fora/hoon
::
:- %say
|= $: {now/@da eny/@uvJ bec/beak}
{{for/ship $~} $~}
==
[%helm-tlon-add-fora for]

View File

@ -1,5 +1,7 @@
:: tlon: add stream to local urbit-meta
::
:: make the local urbit-meta pull from {web}'s stream.
::
:::: /gen/hood/tlon/add-stream/hoon
::
:- %say

View File

@ -0,0 +1,12 @@
:: tlon: configure stream ship
::
:: create a local stream channel and have it pull from
:: {met}'s urbit-meta.
::
:::: /gen/hood/tlon/init-stream/hoon
::
:- %say
|= $: {now/@da eny/@uvJ bec/beak}
{{met/ship $~} $~}
==
[%helm-tlon-init-stream met]

View File

@ -1,9 +0,0 @@
:: 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

@ -241,14 +241,13 @@
|= {way/wire her/ship cop/coop} =< abet
(emit %flog ~ %text "woot: {<[way cop]>}")
::
++ poke-tlon-init-web
++ poke-tlon-init-stream
:: creates stream channel and makes it pull from
:: urbit-meta on {met}.
|= 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
@ -265,7 +264,24 @@
[%stream & [[[met %urbit-meta] `[da+(sub now ~d1) ~]] ~ ~]]
==
::
++ poke-tlon-add-fora
:: makes the local urbit-meta pull from {for}'s fora
:: notification channels.
|= for/ship =< abet
%- emil
:~ :^ %poke /helm/web/fora/source [our %hall]
:- %hall-action
:- %source
[%urbit-meta & [[[for %fora-posts] `[da+now ~]] ~ ~]]
::
:^ %poke /helm/web/fora/source [our %hall]
:- %hall-action
:- %source
[%urbit-meta & [[[for %fora-comments] `[da+now ~]] ~ ~]]
==
::
++ poke-tlon-add-stream
:: makes the local urbit-meta pull from {web}'s stream.
|= web/ship =< abet
%- emit
:^ %poke /helm/web/stream/source [our %hall]