/- gate=trill-gate /+ mp=mop-extensions |% +$ id @da +$ pid [=ship =id] :: anon post type? +$ tag @t +$ gfeed ((mop pid post) ggth) ++ ggth |=([[shipa=@p a=time] [shipb=@p b=time]] (gth a b)) ++ gorm ((on pid post) ggth) ++ torm ((on pid thread) ggth) ++ porm ((on pid pid) ggth) ++ gorrm ((mp pid post) ggth) +$ feed ((mop id post) gth) ++ orm ((on id post) gth) +$ full-graph ((mop pid full-node) ggth) ++ form ((on pid full-node) ggth) :: instead of using this I'm just gonna jam old names +$ perms [read=lock:gate write=lock:gate] +$ cursor (unit id) +$ page-req [newer=cursor older=cursor count=@ud] +$ full-node [p=post children=$~(~ full-graph)] +$ cpage [p=(list post) top=@ud bot=@ud] +$ spage [p=(list post) page-req] +$ page [p=(list full-node) page-req] +$ pfilter $-(=post ?) +$ tfilter $-(=thread ?) +$ bfilter $-([=thread =post] ?) :: search filter +$ tpage [p=(list thread) page-req] +$ thread $: =pid replies=(list pid) :: key should be the head of this list title=@t =path tags=(set tag) snip=content-list == +$ post $: =id title=@t author=ship thread=pid :: this is the key of the threads table! parent=(unit pid) children=(set pid) contents=content-map =perms =engagement =signature tags=(set tag) ::TODO make sure it's not infinite == :: +$ signature [p=@uvH q=ship r=life] +$ engagement $: =reacts quoted=(set signed-pid) shared=(set signed-pid) == +$ signed-pid [=signature =pid] +$ react @t +$ reacts (map ship signed-react) +$ signed-react [p=react q=signature] +$ content-map ((mop time content-list) gth) ++ corm ((on time content-list) gth) +$ heading $?(%h1 %h2 %h3 %h4 %h5 %h6) +$ content-list (list block) +$ paragraph (list inline) :: man tables are a rabbit hole. we'll get to it ++ table |^ [%table headers=(list cell) rows=(list row)] +$ row (list cell) +$ cell content-list -- +$ clist [%list p=(list li) ordered=?] +$ li content-list +$ block $% [%paragraph p=paragraph] [%blockquote p=paragraph] :: table clist [%heading p=cord q=heading] [%media =media] [%codeblock code=cord lang=cord] [%eval hoon=cord] [%tasklist p=(list task)] :: [%ref app=term =ship =path] [%json origin=term content=@t] == +$ task [p=paragraph q=?] +$ poll-opt [option=cord votes=@] +$ media $% [%images p=(list [url=@t caption=@t])] [%video p=cord] [%audio p=cord] == +$ inline $% [%text p=cord] [%italic p=cord] [%bold p=cord] [%strike p=cord] [%codespan p=cord] [%link href=cord show=cord] [%break ~] :: not strictly markdown [%ship p=ship] [%date p=@da] [%note id=cord text=(list inline)] :: footnotes and so on [%underline p=cord] [%sup p=cord] [%sub p=cord] [%ruby p=cord q=cord] == --