urbit/pkg/arvo/sur/publish.hoon

122 lines
2.7 KiB
Plaintext
Raw Normal View History

|%
::
+$ action
$% $: %new-collection
name=@tas
title=@t
com=comment-config
edit=edit-config
perm=perm-config
==
::
$: %new-post
2019-06-17 21:39:53 +03:00
who=@p
coll=@tas
name=@tas
title=@t
com=comment-config
perm=perm-config
content=@t
==
::
2019-06-17 21:39:53 +03:00
[%new-comment who=@p coll=@tas post=@tas content=@t]
::
2019-06-21 23:24:33 +03:00
[%delete-collection coll=@tas]
[%delete-post coll=@tas post=@tas]
[%delete-comment coll=@tas post=@tas comment=@tas]
::
2019-07-19 01:34:42 +03:00
[%edit-collection name=@tas title=@t]
::
$: %edit-post
2019-06-17 21:39:53 +03:00
who=@p
coll=@tas
name=@tas
title=@t
com=comment-config
perm=perm-config
content=@t
==
::
2019-06-21 23:24:33 +03:00
[%invite coll=@tas title=@t who=(list ship)]
[%reject-invite who=@p coll=@tas]
::
[%serve coll=@tas]
[%unserve coll=@tas]
::
[%subscribe who=@p coll=@tas]
[%unsubscribe who=@p coll=@tas]
::
2019-06-21 23:24:33 +03:00
[%read who=@p coll=@tas post=@tas]
==
::
+$ collection-info
$: owner=@p
title=@t
filename=@tas
comments=comment-config
allow-edit=edit-config
date-created=@da
last-modified=@da
==
::
+$ post-info
$: creator=@p
title=@t
collection=@tas
filename=@tas
comments=comment-config
date-created=@da
last-modified=@da
pinned=?
==
::
+$ comment-info
$: creator=@p
collection=@tas
post=@tas
date-created=@da
last-modified=@da
==
::
2019-07-11 21:32:30 +03:00
+$ comment [info=comment-info body=@t]
::
+$ perm-config [read=rule:clay write=rule:clay]
::
+$ comment-config $?(%open %closed %none)
::
+$ edit-config $?(%post %comment %all %none)
::
+$ rumor delta
::
+$ publish-dir (map path publish-file)
::
+$ publish-file
$% [%udon @t]
[%publish-info collection-info]
[%publish-comment comment]
==
::
+$ collection
2019-06-27 03:15:16 +03:00
$: col=[=bone dat=(each collection-info tang)]
pos=(map @tas [=bone dat=(each [post-info manx @t] tang)])
com=(map @tas [=bone dat=(each (list [comment-info @t]) tang)])
order=[pin=(list @tas) unpin=(list @tas)]
2019-06-27 03:15:16 +03:00
contributors=[mod=?(%white %black) who=(set @p)]
2019-06-21 23:24:33 +03:00
subscribers=(set @p)
2019-06-27 03:15:16 +03:00
last-update=@da
==
::
+$ delta
$% [%collection who=@p col=@tas dat=(each collection-info tang)]
2019-06-17 21:39:53 +03:00
[%post who=@p col=@tas pos=@tas dat=(each [post-info manx @t] tang)]
2019-07-12 01:20:29 +03:00
[%comments who=@p col=@tas pos=@tas dat=(each (list comment) tang)]
[%total who=@p col=@tas dat=collection]
2019-06-21 23:24:33 +03:00
[%remove who=@p col=@tas pos=(unit @tas)]
==
::
+$ update
$% [%invite add=? who=@p col=@tas title=@t]
[%unread add=? keys=(set [who=@p coll=@tas post=@tas])]
==
--