shrub/pkg/arvo/sur/link.hoon
Fang a95449cc64
link: social bookmarking core implementation
Stores URLs and their titles for the local ship. Can listen to
"submissions" on foreign ships.

Has a primitive perspective on groups, treating them as
always-interesting. Auto-subscribes to all ships in all groups.

Foreign communications untested.
2019-12-11 20:49:49 +01:00

45 lines
953 B
Plaintext

:: link: social bookmarking
::
:: link operates on the core structure of "pages", which are URLs saved at a
:: specific time with a specific title.
:: submissions, then, are pages received from a specific ship.
::
|%
:: primitives
::
+$ url @t
+$ site @t :: domain, host, etc.
:: +page: a saved URL with timestamp and custom title
::
+$ page
$: title=@t
=url
=time
==
:: +submission: a page saved by a ship
::
+$ submission
$: =ship
page
==
:: lists, reverse chronological / newest first
::
+$ pages (list page)
+$ submissions (list submission)
::
:: +action: local actions
::
+$ action
$% [%add =path title=@t =url]
[%hear =path from=ship =page] ::TODO just =submission?
==
:: +update: local updates
::
::NOTE we include paths explicitly to support the "subscribed to all" case
::
+$ update
$% [%local-pages =path =pages]
[%submissions =path =submissions]
==
--