summaryrefslogtreecommitdiff
path: root/desk/sur/boke.hoon
diff options
context:
space:
mode:
Diffstat (limited to 'desk/sur/boke.hoon')
-rw-r--r--desk/sur/boke.hoon113
1 files changed, 113 insertions, 0 deletions
diff --git a/desk/sur/boke.hoon b/desk/sur/boke.hoon
new file mode 100644
index 0000000..6af312d
--- /dev/null
+++ b/desk/sur/boke.hoon
@@ -0,0 +1,113 @@
+/- tp=trill-post, tlonc=tlon-channels, polls
+|%
++$ action
+$% [%add p=post:tp]
+ [%del p=id:tp]
+ :: approve comments?
+ [%add-board name=@t]
+ [%del-board name=@t]
+==
++$ kaji-req
+$% [%board-redi =post:tp]
+ [%blog-redi =post:tp]
+ [%redi url=@t]
+ [%tv-chat p=@t q=post:tp]
+ [%radio-chat p=@p q=*]
+ [%chat-msg p=flag:tlonc q=memo:tlonc]
+==
++$ state state-0
++$ tags-table (map @t pidmap)
++$ pathmap (map path pid:tp)
++$ threadsf ((mop pid:tp thread:tp) ggth:tp)
++$ pidmap ((mop pid:tp pid:tp) ggth:tp)
++$ external ((mop esrc epost) extc)
+++ erm ((on id:tp post:tp) gth)
++$ esrc
+$: time=@da
+ id=@t :: whatever
+==
++$ epost
+ $: =pid:tp
+ url=@t
+ service=@t
+ json=@t
+==
+++ extc |= [a=esrc b=esrc] (gth time.a time.b)
+:: in active threads the pid is the pid of the last reply
++$ state-0
+$: %0
+ :: all data here. flat structure. fk'it
+ feed=gfeed:tp
+ threads=threadsf
+ active-threads=pidmap :: same as above but ordered by last reply
+ paths=pathmap
+ tags=tags-table
+ tv=tv-table
+ polls=polls-table
+ notifications=hark-table
+ external=(map @t external) :: twitter etc, tagged or named
+==
++$ tv-table
+ $: urbit=(map @p urbit-radio)
+ here=(map @t bstv)
+ ==
++$ hark-table (map @p t-hark)
++$ t-hark
+ $: last-online=@da
+ tracking=(map pid:tp post:tp)
+ ==
++$ polls-table (map pid:tp poll:polls)
++$ bstv
+ $: name=@t
+ owner=@p
+ current=[playing=@t started=@da] :: should point to the schedule
+ schedule=(map @da tv-station)
+ ==
++$ tv-station
+ $: description=cord
+ src=cord :: source file
+ started=@da
+ ended=(unit @da)
+ viewers=(map @p (list presence))
+ chat=(list post:tp)
+ perms=*
+ ==
++$ presence [came=@da left=@da]
++$ twr $%([%our name=@t owner=@p tv=tv-station] [%urb name=@t owner=@p p=urbit-radio])
++$ urbit-radio
+ $:
+ description=cord
+ location=ship
+ time=@da
+ viewers=@ud
+ ==
++$ radio-event
+ $% [%put p=urbit-radio]
+ [%remove =ship]
+ [%request ~]
+ [%response minitowers=(map ship urbit-radio)]
+ ==
+
++$ admin
+$: banned=(set address:eyre)
+ settings=(map @p setting)
+==
++$ setting
+$: thing=*
+==
+
+:: fetching stuff, shouldn't be here really but whatever
++$ section $?(%blog %comments %chat %threads %replies)
++$ chat-page [p=scan:tlonc older=(unit @da) newer=(unit @da) count=@ud]
++$ search-res $%([%chat chat-page] [%trill search-page])
++$ search-page
+ $: res=(list post-snip)
+ newer=cursor:tp
+ older=cursor:tp
+ ==
++$ post-snip
+ $: fn=full-node:tp
+ snip=@t
+ ==
+
+--