2019-11-19 19:26:05 +03:00
|
|
|
:: link: social bookmarking
|
|
|
|
::
|
|
|
|
:: the paths under which links are submitted are generally expected to
|
|
|
|
:: correspond to existing group paths. for strictly-local collections of
|
|
|
|
:: links, arbitrary paths are probably fair game, but could trip up
|
|
|
|
:: primitive ui implementations.
|
|
|
|
::
|
2020-02-05 19:39:08 +03:00
|
|
|
:: urls in paths are expected to be encoded using +wood, for @ta sanity.
|
2020-02-07 23:43:11 +03:00
|
|
|
:: generally, use /lib/link's +build-discussion-path.
|
2020-02-05 19:39:08 +03:00
|
|
|
::
|
2019-12-21 02:51:49 +03:00
|
|
|
:: see link-listen-hook to see what's synced in, and similarly
|
|
|
|
:: see link-proxy-hook to see what's exposed.
|
|
|
|
::
|
2019-11-19 19:26:05 +03:00
|
|
|
:: scry and subscription paths:
|
|
|
|
::
|
2020-02-07 23:43:11 +03:00
|
|
|
:: (map path pages) %local-pages
|
2020-01-15 04:46:24 +03:00
|
|
|
:: /local-pages our saved pages
|
|
|
|
:: /local-pages/some-path our saved pages on path
|
|
|
|
::
|
2020-02-07 23:43:11 +03:00
|
|
|
:: (map path submissions) %submissions
|
2020-01-15 04:46:24 +03:00
|
|
|
:: /submissions all submissions we've seen
|
|
|
|
:: /submissions/some-path all submissions we've seen on path
|
|
|
|
::
|
2020-02-07 23:43:11 +03:00
|
|
|
:: (map path (map url notes)) %annotations
|
2020-01-15 04:46:24 +03:00
|
|
|
:: /annotations our comments
|
2020-02-05 19:39:08 +03:00
|
|
|
:: /annotations/wood-url our comments on url
|
|
|
|
:: /annotations/wood-url/some-path our comments on url on path
|
2020-01-15 04:46:24 +03:00
|
|
|
:: /annotations//some-path our comments on path
|
|
|
|
::
|
2020-02-07 23:43:11 +03:00
|
|
|
:: (map path (map url comments)) %discussions
|
2020-01-15 04:46:24 +03:00
|
|
|
:: /discussions all comments
|
2020-02-05 19:39:08 +03:00
|
|
|
:: /discussions/wood-url all comments on url
|
|
|
|
:: /discussions/wood-url/some-path all comments on url on path
|
2020-01-15 04:46:24 +03:00
|
|
|
:: /discussions//some-path all comments on path
|
2019-11-19 19:26:05 +03:00
|
|
|
::
|
2020-02-07 23:49:16 +03:00
|
|
|
:: subscription-only paths:
|
|
|
|
::
|
|
|
|
:: [path url] %observation
|
|
|
|
:: /seen updates whenever an item is seen
|
|
|
|
::
|
|
|
|
:: scry-only paths:
|
|
|
|
::
|
2020-02-14 03:57:58 +03:00
|
|
|
::
|
|
|
|
:: (map path (set url))
|
|
|
|
:: /unseen the ones we haven't seen yet
|
|
|
|
::
|
2020-02-10 22:18:42 +03:00
|
|
|
:: (set url)
|
2020-02-14 03:54:16 +03:00
|
|
|
:: /unseen/some-path the ones we haven't seen here yet
|
2020-02-10 22:18:42 +03:00
|
|
|
::
|
2020-02-07 23:49:16 +03:00
|
|
|
:: ?
|
2020-02-10 22:18:42 +03:00
|
|
|
:: /seen/wood-url/some-path have we seen this here
|
2020-02-07 23:49:16 +03:00
|
|
|
::
|
2020-01-29 21:21:40 +03:00
|
|
|
/+ *link, default-agent, verb, dbug
|
2019-11-19 19:26:05 +03:00
|
|
|
::
|
|
|
|
|%
|
|
|
|
+$ state-0
|
|
|
|
$: %0
|
|
|
|
by-group=(map path links)
|
|
|
|
by-site=(map site (list [path submission]))
|
2020-01-15 04:46:24 +03:00
|
|
|
discussions=(per-path-url discussion)
|
2019-11-19 19:26:05 +03:00
|
|
|
==
|
|
|
|
::
|
|
|
|
+$ links
|
|
|
|
$: ::NOTE all lists by recency
|
|
|
|
=submissions
|
|
|
|
ours=pages
|
2020-02-07 23:49:16 +03:00
|
|
|
seen=(set url)
|
2019-11-19 19:26:05 +03:00
|
|
|
==
|
|
|
|
::
|
2019-12-21 02:51:49 +03:00
|
|
|
+$ discussion
|
|
|
|
$: =comments
|
|
|
|
ours=notes
|
|
|
|
==
|
|
|
|
::
|
2019-11-19 19:26:05 +03:00
|
|
|
+$ card card:agent:gall
|
|
|
|
--
|
|
|
|
::
|
|
|
|
=| state-0
|
|
|
|
=* state -
|
|
|
|
::
|
2020-01-29 21:21:40 +03:00
|
|
|
%- agent:dbug
|
2019-11-20 00:56:29 +03:00
|
|
|
%+ verb |
|
2019-11-19 19:26:05 +03:00
|
|
|
^- agent:gall
|
|
|
|
=<
|
|
|
|
|_ =bowl:gall
|
|
|
|
+* this .
|
|
|
|
do ~(. +> bowl)
|
|
|
|
def ~(. (default-agent this %|) bowl)
|
|
|
|
::
|
|
|
|
++ on-init on-init:def
|
|
|
|
++ on-save !>(state)
|
|
|
|
++ on-load
|
|
|
|
|= old=vase
|
|
|
|
^- (quip card _this)
|
|
|
|
[~ this(state !<(state-0 old))]
|
|
|
|
::
|
|
|
|
++ on-poke
|
|
|
|
|= [=mark =vase]
|
|
|
|
^- (quip card _this)
|
|
|
|
?> (team:title [our src]:bowl) ::TODO /lib/store
|
|
|
|
=^ cards state
|
|
|
|
?+ mark (on-poke:def mark vase)
|
2019-11-20 18:09:29 +03:00
|
|
|
::TODO move json conversion into mark once mark performance improves
|
2019-11-19 19:26:05 +03:00
|
|
|
%json (do-action:do (action:de-json !<(json vase)))
|
|
|
|
%link-action (do-action:do !<(action vase))
|
|
|
|
==
|
|
|
|
[cards this]
|
|
|
|
::
|
|
|
|
++ on-peek
|
|
|
|
|= =path
|
|
|
|
^- (unit (unit cage))
|
|
|
|
?+ path (on-peek:def path)
|
|
|
|
[%y ?(%local-pages %submissions) ~]
|
|
|
|
``noun+!>(~(key by by-group))
|
2020-01-10 23:55:42 +03:00
|
|
|
::
|
|
|
|
[%x %local-pages *]
|
2019-11-19 19:26:05 +03:00
|
|
|
``noun+!>((get-local-pages:do t.t.path))
|
2020-01-10 23:55:42 +03:00
|
|
|
::
|
|
|
|
[%x %submissions *]
|
2019-11-19 19:26:05 +03:00
|
|
|
``noun+!>((get-submissions:do t.t.path))
|
2020-01-10 23:55:42 +03:00
|
|
|
::
|
2020-01-15 04:46:24 +03:00
|
|
|
[%y ?(%annotations %discussions) *]
|
|
|
|
=/ [spath=^path surl=url]
|
|
|
|
(break-discussion-path t.t.path)
|
|
|
|
=- ``noun+!>(-)
|
|
|
|
::
|
|
|
|
?: =(~ surl)
|
|
|
|
:: no url, provide urls that have comments
|
|
|
|
::
|
|
|
|
^- (set url)
|
|
|
|
?~ spath
|
|
|
|
:: no path, find urls accross all paths
|
|
|
|
::
|
|
|
|
%- ~(rep by discussions)
|
|
|
|
|= [[* discussions=(map url discussion)] urls=(set url)]
|
|
|
|
%- ~(uni in urls)
|
|
|
|
~(key by discussions)
|
|
|
|
:: specified path, find urls for that specific path
|
|
|
|
::
|
|
|
|
%~ key by
|
|
|
|
(~(gut by discussions) spath *(map url *))
|
|
|
|
:: specified url and path, nothing to list here
|
|
|
|
::
|
|
|
|
?^ spath !!
|
|
|
|
:: no path, find paths with comments for this url
|
|
|
|
::
|
|
|
|
^- (set ^path)
|
|
|
|
%- ~(rep by discussions)
|
|
|
|
|= [[=^path urls=(map url discussion)] paths=(set ^path)]
|
|
|
|
?. (~(has by urls) surl) paths
|
|
|
|
(~(put in paths) path)
|
2020-01-10 23:55:42 +03:00
|
|
|
::
|
|
|
|
[%x %annotations *]
|
2019-12-21 02:51:49 +03:00
|
|
|
``noun+!>((get-annotations:do t.t.path))
|
2020-01-10 23:55:42 +03:00
|
|
|
::
|
|
|
|
[%x %discussions *]
|
2019-12-21 02:51:49 +03:00
|
|
|
``noun+!>((get-discussions:do t.t.path))
|
2020-02-07 23:49:16 +03:00
|
|
|
::
|
|
|
|
[%x %seen @ ^]
|
2020-02-14 03:54:16 +03:00
|
|
|
``noun+!>((is-seen:do t.t.path))
|
2020-02-14 03:57:58 +03:00
|
|
|
::
|
|
|
|
[%x %unseen ~]
|
|
|
|
``noun+!>(get-all-unseen:do)
|
2020-02-10 22:18:42 +03:00
|
|
|
::
|
2020-02-14 03:54:16 +03:00
|
|
|
[%x %unseen ^]
|
|
|
|
``noun+!>((get-unseen:do t.t.path))
|
2019-11-19 19:26:05 +03:00
|
|
|
==
|
|
|
|
::
|
|
|
|
++ on-watch
|
|
|
|
|= =path
|
|
|
|
^- (quip card _this)
|
|
|
|
?> (team:title [our src]:bowl) ::TODO /lib/store
|
|
|
|
:_ this
|
|
|
|
|^ ?+ path (on-watch:def path)
|
2020-01-10 23:55:42 +03:00
|
|
|
[%local-pages *]
|
2020-01-15 04:46:24 +03:00
|
|
|
%+ give %link-initial
|
|
|
|
^- initial
|
|
|
|
[%local-pages (get-local-pages:do t.path)]
|
2019-11-19 19:26:05 +03:00
|
|
|
::
|
2020-01-10 23:55:42 +03:00
|
|
|
[%submissions *]
|
2020-01-15 04:46:24 +03:00
|
|
|
%+ give %link-initial
|
|
|
|
^- initial
|
|
|
|
[%submissions (get-submissions:do t.path)]
|
2020-01-29 22:40:20 +03:00
|
|
|
::
|
2020-01-10 23:55:42 +03:00
|
|
|
[%annotations *]
|
2020-01-15 04:46:24 +03:00
|
|
|
%+ give %link-initial
|
|
|
|
^- initial
|
|
|
|
[%annotations (get-annotations:do t.path)]
|
2019-12-21 02:51:49 +03:00
|
|
|
::
|
2020-01-10 23:55:42 +03:00
|
|
|
[%discussions *]
|
2020-01-15 04:46:24 +03:00
|
|
|
%+ give %link-initial
|
|
|
|
^- initial
|
|
|
|
[%discussions (get-discussions:do t.path)]
|
2020-02-07 23:49:16 +03:00
|
|
|
::
|
|
|
|
[%seen ~]
|
|
|
|
~
|
2019-11-19 19:26:05 +03:00
|
|
|
==
|
|
|
|
::
|
|
|
|
++ give
|
|
|
|
|* [=mark =noun]
|
|
|
|
^- (list card)
|
|
|
|
[%give %fact ~ mark !>(noun)]~
|
2020-01-29 22:40:20 +03:00
|
|
|
::
|
|
|
|
++ give-single
|
|
|
|
|* [=mark =noun]
|
|
|
|
^- card
|
|
|
|
[%give %fact ~ mark !>(noun)]
|
2019-11-19 19:26:05 +03:00
|
|
|
--
|
|
|
|
::
|
|
|
|
++ on-leave on-leave:def
|
|
|
|
++ on-agent on-agent:def
|
|
|
|
++ on-arvo on-arvo:def
|
|
|
|
++ on-fail on-fail:def
|
|
|
|
--
|
|
|
|
::
|
|
|
|
|_ =bowl:gall
|
|
|
|
::
|
|
|
|
:: writing
|
|
|
|
::
|
|
|
|
++ do-action
|
|
|
|
|= =action
|
|
|
|
^- (quip card _state)
|
|
|
|
?- -.action
|
2019-12-20 17:58:32 +03:00
|
|
|
%save (save-page +.action)
|
2019-12-21 02:51:49 +03:00
|
|
|
%note (note-note +.action)
|
2020-02-07 23:49:16 +03:00
|
|
|
%seen (seen-submission +.action)
|
2019-12-21 02:51:49 +03:00
|
|
|
::
|
2019-11-19 19:26:05 +03:00
|
|
|
%hear (hear-submission +.action)
|
2019-12-21 02:51:49 +03:00
|
|
|
%read (read-comment +.action)
|
2019-11-19 19:26:05 +03:00
|
|
|
==
|
2019-12-20 17:58:32 +03:00
|
|
|
:: +save-page: save a page ourselves
|
2019-11-19 19:26:05 +03:00
|
|
|
::
|
2019-12-20 17:58:32 +03:00
|
|
|
++ save-page
|
2019-11-19 19:26:05 +03:00
|
|
|
|= [=path title=@t =url]
|
|
|
|
^- (quip card _state)
|
2020-02-07 23:42:33 +03:00
|
|
|
?< |(=(~ path) =(~ title) =(~ url))
|
2019-11-19 19:26:05 +03:00
|
|
|
:: add page to group ours
|
|
|
|
::
|
|
|
|
=/ =links (~(gut by by-group) path *links)
|
|
|
|
=/ =page [title url now.bowl]
|
|
|
|
=. ours.links [page ours.links]
|
|
|
|
=. by-group (~(put by by-group) path links)
|
|
|
|
:: do generic submission logic
|
|
|
|
::
|
2020-02-14 03:55:17 +03:00
|
|
|
=^ submission-cards state
|
2019-11-19 19:26:05 +03:00
|
|
|
(hear-submission path [our.bowl page])
|
2020-02-14 03:55:17 +03:00
|
|
|
:: mark page as seen (because we submitted it ourselves)
|
|
|
|
::
|
|
|
|
=^ seen-cards state
|
|
|
|
(seen-submission path `url)
|
2019-11-19 19:26:05 +03:00
|
|
|
:: send updates to subscribers
|
|
|
|
::
|
|
|
|
:_ state
|
2020-02-14 03:55:17 +03:00
|
|
|
:_ (weld submission-cards seen-cards)
|
2019-11-19 19:26:05 +03:00
|
|
|
:+ %give %fact
|
2020-01-15 04:46:24 +03:00
|
|
|
:+ :~ /local-pages
|
|
|
|
[%local-pages path]
|
|
|
|
==
|
2019-11-19 19:26:05 +03:00
|
|
|
%link-update
|
|
|
|
!>([%local-pages path [page]~])
|
2019-12-21 02:51:49 +03:00
|
|
|
:: +note-note: save a note for a url
|
|
|
|
::
|
|
|
|
++ note-note
|
|
|
|
|= [=path =url udon=@t]
|
|
|
|
^- (quip card _state)
|
2020-02-07 23:42:33 +03:00
|
|
|
?< |(=(~ path) =(~ url) =(~ udon))
|
2019-12-21 02:51:49 +03:00
|
|
|
:: add note to discussion ours
|
|
|
|
::
|
|
|
|
=/ urls (~(gut by discussions) path *(map ^url discussion))
|
|
|
|
=/ =discussion (~(gut by urls) url *discussion)
|
|
|
|
=/ =note [now.bowl udon]
|
|
|
|
=. ours.discussion [note ours.discussion]
|
|
|
|
=. urls (~(put by urls) url discussion)
|
|
|
|
=. discussions (~(put by discussions) path urls)
|
|
|
|
:: do generic comment logic
|
|
|
|
::
|
|
|
|
=^ cards state
|
|
|
|
(read-comment path url [our.bowl note])
|
|
|
|
:: send updates to subscribers
|
|
|
|
::
|
|
|
|
:_ state
|
|
|
|
^- (list card)
|
2020-01-15 04:46:24 +03:00
|
|
|
:_ cards
|
|
|
|
:+ %give %fact
|
|
|
|
:+ :~ /annotations
|
|
|
|
[%annotations %$ path]
|
|
|
|
[%annotations (build-discussion-path url)]
|
|
|
|
[%annotations (build-discussion-path path url)]
|
|
|
|
==
|
|
|
|
%link-update
|
|
|
|
!>([%annotations path url [note]~])
|
2020-02-07 23:49:16 +03:00
|
|
|
:: +seen-submission: mark url as seen/read
|
|
|
|
::
|
|
|
|
:: if no url specified, all under path are marked as read
|
|
|
|
::
|
|
|
|
++ seen-submission
|
|
|
|
|= [=path murl=(unit url)]
|
|
|
|
^- (quip card _state)
|
|
|
|
=/ =links (~(gut by by-group) path *links)
|
|
|
|
:: new: urls we want to, but haven't yet, marked as seen
|
|
|
|
::
|
|
|
|
=/ new=(set url)
|
|
|
|
%. seen.links
|
|
|
|
%~ dif in
|
|
|
|
^- (set url)
|
|
|
|
?^ murl (sy ~[u.murl])
|
|
|
|
%- ~(gas in *(set url))
|
|
|
|
%+ turn submissions.links
|
|
|
|
|=(submission url)
|
|
|
|
?: =(~ new) [~ state]
|
|
|
|
=. seen.links (~(uni in seen.links) new)
|
|
|
|
:_ state(by-group (~(put by by-group) path links))
|
|
|
|
[%give %fact ~[/seen] %link-update !>([%observation path new])]~
|
2019-11-19 19:26:05 +03:00
|
|
|
:: +hear-submission: record page someone else saved
|
|
|
|
::
|
|
|
|
++ hear-submission
|
|
|
|
|= [=path =submission]
|
|
|
|
^- (quip card _state)
|
|
|
|
?< =(~ path)
|
|
|
|
:: add link to group submissions
|
|
|
|
::
|
|
|
|
=/ =links (~(gut by by-group) path *links)
|
|
|
|
=. submissions.links [submission submissions.links]
|
|
|
|
=. by-group (~(put by by-group) path links)
|
|
|
|
:: add submission to global sites
|
|
|
|
::
|
|
|
|
=/ =site (site-from-url url.submission)
|
|
|
|
=. by-site (~(add ja by-site) site [path submission])
|
|
|
|
:: send updates to subscribers
|
|
|
|
::
|
|
|
|
:_ state
|
|
|
|
:_ ~
|
|
|
|
:+ %give %fact
|
2020-01-15 04:46:24 +03:00
|
|
|
:+ :~ /submissions
|
|
|
|
[%submissions path]
|
|
|
|
==
|
2019-11-19 19:26:05 +03:00
|
|
|
%link-update
|
|
|
|
!>([%submissions path [submission]~])
|
2019-12-21 02:51:49 +03:00
|
|
|
:: +read-comment: record a comment someone else made
|
|
|
|
::
|
|
|
|
++ read-comment
|
|
|
|
|= [=path =url =comment]
|
|
|
|
^- (quip card _state)
|
|
|
|
:: add comment to url's discussion
|
|
|
|
::
|
|
|
|
=/ urls (~(gut by discussions) path *(map ^url discussion))
|
|
|
|
=/ =discussion (~(gut by urls) url *discussion)
|
|
|
|
=. comments.discussion [comment comments.discussion]
|
|
|
|
=. urls (~(put by urls) url discussion)
|
|
|
|
=. discussions (~(put by discussions) path urls)
|
|
|
|
:: send updates to subscribers
|
|
|
|
::
|
|
|
|
:_ state
|
2020-01-15 04:46:24 +03:00
|
|
|
:_ ~
|
|
|
|
:+ %give %fact
|
|
|
|
:+ :~ /discussions
|
|
|
|
[%discussions '' path]
|
|
|
|
[%discussions (build-discussion-path url)]
|
|
|
|
[%discussions (build-discussion-path path url)]
|
|
|
|
==
|
|
|
|
%link-update
|
|
|
|
!>([%discussions path url [comment]~])
|
2019-11-19 19:26:05 +03:00
|
|
|
::
|
|
|
|
:: reading
|
|
|
|
::
|
|
|
|
++ get-local-pages
|
|
|
|
|= =path
|
2020-01-15 04:46:24 +03:00
|
|
|
^- (map ^path pages)
|
|
|
|
?~ path
|
|
|
|
:: all paths
|
2020-01-10 23:55:42 +03:00
|
|
|
::
|
2020-01-15 04:46:24 +03:00
|
|
|
%- ~(run by by-group)
|
|
|
|
|=(links ours)
|
|
|
|
:: specific path
|
2020-01-10 23:55:42 +03:00
|
|
|
::
|
2020-01-15 04:46:24 +03:00
|
|
|
%+ ~(put by *(map ^path pages)) path
|
|
|
|
ours:(~(gut by by-group) path *links)
|
2019-11-19 19:26:05 +03:00
|
|
|
::
|
|
|
|
++ get-submissions
|
|
|
|
|= =path
|
2020-01-15 04:46:24 +03:00
|
|
|
^- (map ^path submissions)
|
|
|
|
?~ path
|
|
|
|
:: all paths
|
2020-01-10 23:55:42 +03:00
|
|
|
::
|
2020-01-15 04:46:24 +03:00
|
|
|
%- ~(run by by-group)
|
|
|
|
|=(links submissions)
|
|
|
|
:: specific path
|
2020-01-10 23:55:42 +03:00
|
|
|
::
|
2020-01-15 04:46:24 +03:00
|
|
|
%+ ~(put by *(map ^path submissions)) path
|
|
|
|
submissions:(~(gut by by-group) path *links)
|
|
|
|
::
|
2020-02-14 03:57:58 +03:00
|
|
|
++ get-all-unseen
|
|
|
|
^- (jug path url)
|
|
|
|
%- ~(rut by by-group)
|
|
|
|
|= [=path *]
|
|
|
|
(get-unseen path)
|
|
|
|
::
|
2020-02-10 22:18:42 +03:00
|
|
|
++ get-unseen
|
|
|
|
|= =path
|
|
|
|
^- (set url)
|
|
|
|
=/ =links
|
|
|
|
(~(gut by by-group) path *links)
|
|
|
|
%- ~(gas in *(set url))
|
|
|
|
%+ murn submissions.links
|
|
|
|
|= submission
|
|
|
|
?: (~(has in seen.links) url) ~
|
|
|
|
(some url)
|
|
|
|
::
|
2020-02-07 23:49:16 +03:00
|
|
|
++ is-seen
|
|
|
|
|= =path
|
|
|
|
^- ?
|
|
|
|
=/ [=^path =url]
|
|
|
|
(break-discussion-path path)
|
|
|
|
%. url
|
|
|
|
%~ has in
|
|
|
|
seen:(~(gut by by-group) path *links)
|
|
|
|
::
|
2019-12-21 02:51:49 +03:00
|
|
|
::
|
|
|
|
++ get-annotations
|
|
|
|
|= =path
|
2020-01-15 04:46:24 +03:00
|
|
|
^- (per-path-url notes)
|
|
|
|
=/ args=[=^path =url]
|
2020-01-10 23:55:42 +03:00
|
|
|
(break-discussion-path path)
|
2020-01-15 04:46:24 +03:00
|
|
|
|^ ?~ path
|
|
|
|
:: all paths
|
|
|
|
::
|
|
|
|
(~(run by discussions) get-ours)
|
|
|
|
:: specific path
|
|
|
|
::
|
|
|
|
%+ ~(put by *(per-path-url notes)) path.args
|
|
|
|
%- get-ours
|
|
|
|
%+ ~(gut by discussions) path.args
|
|
|
|
*(map url discussion)
|
2020-01-10 23:55:42 +03:00
|
|
|
::
|
2020-01-15 04:46:24 +03:00
|
|
|
++ get-ours
|
|
|
|
|= m=(map url discussion)
|
|
|
|
^- (map url notes)
|
|
|
|
?: =(~ url.args)
|
|
|
|
:: all urls
|
|
|
|
::
|
|
|
|
%- ~(run by m)
|
|
|
|
|=(discussion ours)
|
|
|
|
:: specific url
|
|
|
|
::
|
|
|
|
%+ ~(put by *(map url notes)) url.args
|
|
|
|
ours:(~(gut by m) url.args *discussion)
|
|
|
|
--
|
2019-12-21 02:51:49 +03:00
|
|
|
::
|
|
|
|
++ get-discussions
|
|
|
|
|= =path
|
2020-01-15 04:46:24 +03:00
|
|
|
^- (per-path-url comments)
|
|
|
|
=/ args=[=^path =url]
|
2020-01-10 23:55:42 +03:00
|
|
|
(break-discussion-path path)
|
2020-01-15 04:46:24 +03:00
|
|
|
|^ ?~ path
|
|
|
|
:: all paths
|
|
|
|
::
|
|
|
|
(~(run by discussions) get-comments)
|
|
|
|
:: specific path
|
|
|
|
::
|
|
|
|
%+ ~(put by *(per-path-url comments)) path.args
|
|
|
|
%- get-comments
|
|
|
|
%+ ~(gut by discussions) path.args
|
|
|
|
*(map url discussion)
|
2020-01-10 23:55:42 +03:00
|
|
|
::
|
2020-01-15 04:46:24 +03:00
|
|
|
++ get-comments
|
|
|
|
|= m=(map url discussion)
|
|
|
|
^- (map url comments)
|
|
|
|
?: =(~ url.args)
|
|
|
|
:: all urls
|
|
|
|
::
|
|
|
|
%- ~(run by m)
|
|
|
|
|=(discussion comments)
|
|
|
|
:: specific url
|
|
|
|
::
|
|
|
|
%+ ~(put by *(map url comments)) url.args
|
|
|
|
comments:(~(gut by m) url.args *discussion)
|
|
|
|
--
|
2019-11-19 19:26:05 +03:00
|
|
|
--
|