misc: update gmime dependency 2.6 -> 3.0
[rb-79.git] / rb79.1
blobe97029ca58b0f460cc4f4879783658ee24c0e5b3
1 .Dd 2017-05-23
2 .Dt RB79 1
3 .Os
4 .Sh NAME
5 .Nm RB-79
6 .Nd A feature-light imageboard.
7 .Sh DESCRIPTION
8 The
9 .Nm
10 suite contains an imageboard server and programs to moderate it.
11 .Sh FILES
12 All of
13 .Nm
14 is governed by the configuration file
15 .Pa config.h
16 at compilation time. Any variables referred to are defined in this
17 file.
18 .Pp
19 While running,
20 .Nm
21 uses file paths defined by the variables
22 .Va static_www_folder
23 and
24 .Va work_path .
25 These folders should be readable by the web-server and writable by
26 the user running
27 .Nm  rb79-server .
28 .Pp
29 .Bl -tag -width Ds
30 .It Va static_www_folder
31 is the folder which
32 .Nm
33 expects will be the root folder of the web server.
34 .It Va work_path
35 is the folder where
36 .Nm
37 will store the post databases and lock files.
38 .El
39 .Sh LOCKING AND PARALLELISM
40 .Nm
41 relies on the underlying database to provide locking. The server
42 is single-threaded. To provide scalability and coordination with
43 utility programs, the
44 .Xr lockf 3
45 mechanism is used.
46 .Sh API
47 Assuming the site is at
48 .Va URL
49 .Bl -bullet -compact
50 .It
51 Boards are at
52 .Va URL Ns / Ns Va board_name
53 .It
54 Threads are at
55 .Va URL Ns / Ns Va board_name Ns /res/ Ns Va thread_number
56 .It
57 Media files are at
58 .Va URL Ns / Ns Va board_name Ns /src/ Ns Va timestamp Ns . Ns Va extension
59 .El
60 .Pp
61 Posting can be accessed by POSTing multipart/form-data to the
62 .Va URL Ns /action
63 endpoint.
64 .Pp
65 .Dl % curl -X POST Va URL Ns /action \e\ 
66 .Dl \& \& \& \& \& \& \& -F action=reply \e\ 
67 .Dl \& \& \& \& \& \& \& -F board=m \e\ 
68 .Dl \& \& \& \& \& \& \& -F thread=123 \e\ 
69 .Dl \& \& \& \& \& \& \& -F 'name=John#trip' \e\ 
70 .Dl \& \& \& \& \& \& \& -F email=sage \e\ 
71 .Dl \& \& \& \& \& \& \& -F subject=Hello \e\ 
72 .Dl \& \& \& \& \& \& \& -F file=@/tmp/picture.jpg \e\ 
73 .Dl \& \& \& \& \& \& \& -F 'comment=I like this picture.' \e\ 
74 .Dl \& \& \& \& \& \& \& -F challengeid=1 \e\ 
75 .Dl \& \& \& \& \& \& \& -F challengeresponse=ball
76 .Pp
77 Most parameters are straightforward.
78 .Pp
79 .Bl -bullet -compact
80 .It
81 .Va action
82 is one of
83 .Dq reply
84 .Po this necessitates a
85 .Va thread
86 parameter
87 .Pc
88 .Dq newthread ,
90 .Dq rebuild 
91 .Po
92 this is only accepted from the local machine, and rebuilds all
93 static files
94 .Pc .
95 .It
96 .Va challengeid
97 and
98 .Va challengeresponse
99 must be a matching pair from the
100 .Va challenges
101 array of
102 .Pa config.h .
104 .Sh MODERATION
105 Moderation is typically performed by editing the relevant databases,
106 then forcing a rebuild via
108 .Dl % curl -X POST Va URL Ns /action -F action=rebuild
110 from the server
112 .Dq rebuild
113 is only accepted from a local IP address
114 .Pc ,
115 or the associated convenience programs may be used:
117 .Bl -bullet -compact
119 .Xr rb79-view-thread 1
121 .Sh AUTHORS
122 .An De Rais Aq Mt derais@cock.li