descriptionRB-79 imageboard
homepage URLhttp://mechachan.net
ownerderais@cock.li
last changeWed, 29 Mar 2023 03:37:31 +0000 (28 23:37 -0400)
content tags
add:
README
This is an image board written in C. It has few features.

You need:

 - fcgi            [ https://fastcgi-archives.github.io  ]
 - gmime           [ https://github.com/GNOME/gmime , the 2.6 branch ]
 - libmagic        [ https://www.darwinsys.com/file  ]
 - libsodium       [ https://libsodium.org ]
 - pcre2           [ http://www.pcre.org  ]
 - spawn-fcgi      [ http://redmine.lighttpd.net/projects/spawn-fcgi ]
 - sqlite3         [ https://sqlite.org/ ]
 - a web server that works with fcgi (I dunno, most of them?)
 - the programs you reference in config.h (see filetypes), which
   for the default config are:
    - ffmpeg       [ https://ffmpeg.org/ ]
    - imagemagick  [ https://www.imagemagick.org/ ]
    - jhead        [ http://www.sentex.net/~mwandel/jhead/ ]
 - a C implementation defining __STDC_ISO_10646__ and conforming
   to POSIX.1-2008, with the IPV6 extensions

(I'd like to drop GMime dep, but RFC 7578 is a bear, and I don't
want a gazillion CVEs on my head.)

Use it by:

 - put the following in nginx.conf. If you don't use nginx, translate
   it and send me a patch, okay?

        server {
                listen 127.0.0.1;
                server_name localhost;
        
                access_log /var/log/nginx/localhost.access_log main;
                error_log /var/log/nginx/localhost.error_log info;
        
                # This is static_www_root in config.h
                root /where/all/your/static/files/live
        
                location /action {
                        include fastcgi_params;
                        fastcgi_pass 127.0.0.1:9000;
                        client_max_body_size 5M;
                }
        }

 - copy config.def.h to config.h, edit to define boards and stuff,
   then recompile with

    make # that's it; no autohell.

   Optionally, you can install it with `make install'.

 - make sure you read the file_description_prog bit in config.def.h.

 - copy example/* to /where/all/your/static/files/live/ and edit
   _templates/* as desired (no seriously, you GOTTA edit as desired).
   The variables you can use are

     o ${BOARD}: expands to something like "m"

     o ${BOARD_TITLE}: expands to something like "mecha"

     o ${CHALLENGE_ID}: the (random) index of ${CHALLENGE}

     o ${CHALLENGE}: text and image for a CAPTCHA

     o ${PAGELINKS}: links to /m/1, /m/2, &c

     o ${POSTS}: posts for this thread

     o ${RANDOM_HEADER}: an image from the banners list

     o ${RECENT_POSTS}: the last 10 or so posts, for /recent

     o ${THREADS}: thread summaries for this board

   These can only be used where they make sense (you can't post on
   /recent, for example, so ${CHALLENGE} doesn't work there).

 - write index.html to your desires. Maybe add an FAQ or a Rules
   page? Also look at the .user.js file to see if you want fancy
   features.

 - make sure all the directories (your static_www_root and work_path)
   are writable (don't worry, it'll test and warn you in the next
   step if you screw this up).

 - run

    spawn-fcgi -n -a 127.0.0.1 -p 9000 -- /path/to/rb79-server

   If you want the system to handle it, put that in a service script
   or add it to /etc/s6-rc/source or whatever you cool kids are
   doing these days.

 - if you want to use /recent, put /path/to/rb79-update-recent-page
   in a cronjob.

 - whenever you need to ban someone or sticky a thread or something,
   use the acompanying programs (rb79-view-thread, etc.) or edit
   the db manually, then issue a REBUILD command (see API). You can
   also check out the manuals.

That's pretty much it.


         ██▄▄
           ▀██▓▄▄
              ▀▀██▓▄▄
                 ▀▀███▓▄
                     ▀████▓▄
                        ▀▀███▓▄▄
                           ▀▀████▓▄▄
                               ▀████▓▓▄▄
                                  ▀▀████▓▓▄▄
                                      ▀█████▓▓▓▄
                                         ▀██████▓▓▄▄
                                           ▀███████▓▓▓▄
                                            ▀██████████▓▓▄ ▄
                                             ▀█████▓▓▀▓█████▓▓▄▄
                                         ▄▄▄▄▓▓█▓▓█▓▒▒▓█████▓▓▓▌
                                      ▄▄█▓▓█▓▀▒▀▒▓▀▓▌   █████▓█▌
                                   ▄░▀▀░░▓▀░░░░░░░░░▐░▄  ████▓█▌
                                ▄▒▄▄▒░░▐▓░░░░░▀▀▀▀▀▀▒▒▒▄▒▓█████▌
                              ▄▓▀░░░░░░▓░░░░▐▓░░░░░░░░░░░▒▀███▀▀
                            ▄▒░░░░▐█▓▄▓▓▓▓█▓████▄░░░░░░░░░░░▐▄
                           ▄░░░▐█████████████████▒░░░░░░░░░░░░▄
      ▄▄▄▄                ▐░░░░██████████████████▌░░░░░░░░░▄██▄▄
   ░░▒▒░▒▀▌▌              ▌░░░▐█████████▓▓▓▓██████▄▄▄▄░░░░░▓███▓
 ▐░▒▀▓██▒▌▐▌▌            ▐░░▄▄▓███████▓▓▓▓▓▓▓▓████░▐▀▀▀▀▀▒▒▄███▓▌
▀▀  ▒████▒▒▓▌            ▐▒▀░░▐███████▓▓▓▓▓▓▓████▌░░░░░░░░░░░▒▓▓▌
   ▄▓▓▀▄▄▓▓▓▓             ░░░░░█████████▓████████░░░░░░░░░▐░▓▀▀▓▌
  ▀    ▀▓▓▓▓▓█            ▀░░░░▐████████████████░░░░░░░░░▄░▐▐██▓▌▄
       ▐▓▀▒▌▀▐▌            ▒░░░░▐▀▀▀▀▐█▌░░░░░░░░░░░░░░░░▒▌░▐░█▌▓▌▌
        ▀░░░░░░            ▐▄░░░░░░░░░▐█░░░░░░░░░░░░░░▒▓▀░░▌░██▓▒▌
         ▒░░░░░▒            ▒▒▄░▄▄▒▒░░░▐▌░░░░░▒▀▀▀▓▓▓▓▓░░░░▌▐██▓▌▌
          ▄░░░▄▓            ░░▐▀▓▓▄▄▄░░░▀▌░▒▄▄▄▓▓▓▓▒▓▓▄▓▓▓▓▒░█▓█▓
           ▀▓▓▓▀            ▒▒▒▒▒▓▓▓▓▓▓▀▓█▓▓▓▓▓▓▓▓▓▓█▌░▓▒▓▒▓▀█▒██
             ▄░░▄      ▄▄▄▀▒░▒▄░▒▀▓▌▓▓█▌███▌████▓███▓▓▌▒▒▒▒▓▌▐█▀█
             ▐░░▐▄▄▄▄▒█▒▓▒▐▒░▄▓▓▓▓█▓▓▓▓▓▓▓████▓▓▓▓▓▓█▓▓▓▄▌▌██▓▓▓▓
             ▄▓▄▄▀▒▀█▓▐▓▓▓▓▓▓▓▌▓▓▓▒▒▓▓▓██▓███▓▓██▓▓▀▀▀███▄▄▄▓▄▓▓▀
             ▌█▄▓▓▓▄██▀▀       ▀▀▀▀▀▀▀ ▐▀▀▀███▀▀▀      ▐▌▒▐▌▒█▒▌
              ▀▀▀▀▀▀▀                                  ▐▌▌▒▌▄▓█▀░▄   ▄▄▒▀▄░░▄
                                                         ▀▀ █▒░░▄▐▓▒▒▓▒▐░▓░░▐▄
                                                             ▓▓▓░▌▌▄▒▄▒▓▓▒▓░░░▄
                                                              ▀██▓▒▒▒▓▓▓▓▓▓░░░▐
                                                                ▀▀▓▀▀▒▀▓▓▓▓▄
                                                                      ▀▒▓▓▓▓▄

                             Fig 1. The RB-79 Ball
shortlog
2023-03-29 De Raisserver: handle pcre2 now returning -1 for "no match"master
2023-03-28 De Raismisc: update gmime dependency 2.6 -> 3.0
2020-06-09 De Raisserver: early return on ban detection
2020-06-07 De Raismisc: update unicode-transforms.hv1.2
2020-06-07 De Raisserver: tie regex filters to db_insert_ban
2020-06-07 De Raisserver: implement -s bans
2020-06-07 De Raisserver: apply forbidden regex to more fields
2020-06-01 De Raisserver: let some boards be exempt from /recent
2020-05-29 De Raisserver: implement forbidden regex list
2020-05-16 De Raismisc: bump copyright years
2020-05-16 De Raismisc: correctly proceed to thread-deletion in rb79...
2018-12-01 De Raisallow overriding pkg-config
2018-10-14 De Raisconfig: make conv dir configurable
2018-09-24 De Raisserver: truncate slurp'd files correctly
2018-09-23 De Raismisc: a few portability tweaks
2018-08-12 De Raismisc: update copyright yearsv1.1
...
tags
3 years ago v1.2
5 years ago v1.1
6 years ago v1.0
heads
13 months ago master