2021-03-30 20:20:32 +03:00
|
|
|
/- *post, met=metadata-store, graph=graph-store, hark=hark-graph-hook
|
2020-09-08 07:18:21 +03:00
|
|
|
|_ i=indexed-post
|
|
|
|
++ grow
|
|
|
|
|%
|
|
|
|
++ noun i
|
2021-01-26 07:47:35 +03:00
|
|
|
++ graph-permissions-add
|
2021-01-26 05:42:44 +03:00
|
|
|
|= vip=vip-metadata:met
|
2021-03-30 20:20:32 +03:00
|
|
|
^- permissions:graph
|
2021-01-26 05:42:44 +03:00
|
|
|
?+ index.p.i !!
|
|
|
|
[@ ~] [%yes %yes %no] :: new note
|
2021-01-26 07:47:35 +03:00
|
|
|
[@ %1 @ ~] [%self %self %no]
|
2021-01-26 05:42:44 +03:00
|
|
|
[@ %2 @ ~] [%yes %yes ?:(?=(%reader-comments vip) %yes %no)]
|
|
|
|
[@ %2 @ @ ~] [%self %self %self]
|
|
|
|
==
|
|
|
|
::
|
2021-01-26 07:47:35 +03:00
|
|
|
++ graph-permissions-remove
|
2021-01-26 05:42:44 +03:00
|
|
|
|= vip=vip-metadata:met
|
2021-03-30 20:20:32 +03:00
|
|
|
^- permissions:graph
|
2021-01-26 05:42:44 +03:00
|
|
|
?+ index.p.i !!
|
|
|
|
[@ ~] [%yes %self %self]
|
2021-01-26 07:54:29 +03:00
|
|
|
[@ %1 @ @ ~] [%yes %self %self]
|
|
|
|
[@ %2 @ ~] [%yes %self %self]
|
2021-01-26 05:42:44 +03:00
|
|
|
[@ %2 @ @ ~] [%yes %self %self]
|
|
|
|
==
|
2020-11-03 07:55:32 +03:00
|
|
|
:: +notification-kind
|
2021-01-26 05:42:44 +03:00
|
|
|
:: ignore all containers, only notify on content
|
2020-11-03 07:55:32 +03:00
|
|
|
::
|
|
|
|
++ notification-kind
|
2021-03-30 20:20:32 +03:00
|
|
|
^- (unit notif-kind:hark)
|
2020-11-03 07:55:32 +03:00
|
|
|
?+ index.p.i ~
|
2021-02-26 06:36:15 +03:00
|
|
|
[@ %1 %1 ~] `[%note [0 1] %each %children]
|
|
|
|
[@ %2 @ %1 ~] `[%comment [1 3] %count %siblings]
|
2020-11-03 07:55:32 +03:00
|
|
|
==
|
2021-02-23 01:54:45 +03:00
|
|
|
::
|
|
|
|
++ transform-add-nodes
|
2021-02-24 21:25:53 +03:00
|
|
|
|= [=index =post =atom was-parent-modified=?]
|
2021-02-23 01:54:45 +03:00
|
|
|
^- [^index ^post]
|
2021-02-24 21:25:53 +03:00
|
|
|
=- [- post(index -)]
|
|
|
|
?+ index ~|(transform+[index post] !!)
|
|
|
|
[@ ~] [atom ~]
|
|
|
|
[@ %1 ~] [atom %1 ~]
|
|
|
|
::
|
|
|
|
[@ %1 @ ~]
|
|
|
|
?: was-parent-modified
|
2021-02-25 21:41:17 +03:00
|
|
|
[atom %1 i.t.t.index ~]
|
|
|
|
index
|
2021-02-24 21:25:53 +03:00
|
|
|
::
|
|
|
|
[@ %2 ~] [atom %2 ~]
|
|
|
|
[@ %2 @ ~] [i.index %2 atom ~]
|
|
|
|
[@ %2 @ @ ~]
|
|
|
|
?: was-parent-modified
|
2021-02-25 21:41:17 +03:00
|
|
|
[i.index %2 atom i.t.t.t.index ~]
|
|
|
|
index
|
2020-11-03 07:55:32 +03:00
|
|
|
==
|
2020-09-08 07:18:21 +03:00
|
|
|
--
|
|
|
|
++ grab
|
|
|
|
|%
|
2021-03-05 21:26:30 +03:00
|
|
|
:: +noun: validate publish note
|
2020-09-15 08:51:46 +03:00
|
|
|
::
|
2020-09-08 07:18:21 +03:00
|
|
|
++ noun
|
|
|
|
|= p=*
|
|
|
|
=/ ip ;;(indexed-post p)
|
2020-09-08 09:08:52 +03:00
|
|
|
?+ index.p.ip !!
|
2020-11-10 22:56:19 +03:00
|
|
|
:: top level post must have no content
|
|
|
|
[@ ~]
|
|
|
|
?> ?=(~ contents.p.ip)
|
|
|
|
ip
|
2020-09-15 08:51:46 +03:00
|
|
|
:: container for revisions
|
|
|
|
::
|
|
|
|
[@ %1 ~]
|
|
|
|
?> ?=(~ contents.p.ip)
|
|
|
|
ip
|
|
|
|
:: specific revision
|
|
|
|
:: first content is the title
|
|
|
|
:: revisions are numbered by the revision count
|
|
|
|
:: starting at one
|
|
|
|
[@ %1 @ ~]
|
2020-10-29 02:35:43 +03:00
|
|
|
?> ?=([* * *] contents.p.ip)
|
2020-09-08 09:08:52 +03:00
|
|
|
?> ?=(%text -.i.contents.p.ip)
|
|
|
|
ip
|
2020-09-15 08:51:46 +03:00
|
|
|
:: container for comments
|
2020-11-10 22:56:19 +03:00
|
|
|
::
|
2020-09-15 08:51:46 +03:00
|
|
|
[@ %2 ~]
|
|
|
|
?> ?=(~ contents.p.ip)
|
|
|
|
ip
|
2020-11-10 22:56:19 +03:00
|
|
|
:: container for comment revisions
|
|
|
|
::
|
2020-10-05 07:53:46 +03:00
|
|
|
[@ %2 @ ~]
|
2020-09-15 08:51:46 +03:00
|
|
|
?> ?=(~ contents.p.ip)
|
|
|
|
ip
|
2020-11-10 22:56:19 +03:00
|
|
|
:: specific comment revision
|
|
|
|
::
|
|
|
|
[@ %2 @ @ ~]
|
|
|
|
?> ?=(^ contents.p.ip)
|
|
|
|
ip
|
2020-09-08 09:08:52 +03:00
|
|
|
==
|
2020-09-08 07:18:21 +03:00
|
|
|
--
|
|
|
|
::
|
|
|
|
++ grad %noun
|
|
|
|
--
|