summaryrefslogtreecommitdiff
path: root/desk/sur/boke.hoon
blob: 6af312d5f58c4e8000a4022a1b79d597bd92b992 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
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
  ==

--