diff --git a/DEPS b/DEPS new file mode 100644 index 0000000..d417569 --- /dev/null +++ b/DEPS @@ -0,0 +1,4 @@ +python 3 +pylzma +argparse +probably some other stuff i can't remember diff --git a/README b/README new file mode 100644 index 0000000..0e24b29 --- /dev/null +++ b/README @@ -0,0 +1,45 @@ +Real-Time Board Watcher - Python(3) version + +This is a configurable script that monitors new posts from 4chan board(s) in various ways with support for daemonisation and JSON output. +For a list of dependencies read DEPS. + +NOTE: This is designed as a `backend' and not intended for human-readable output; unless you like reading JSON. +NOTE2: By default comments and subjects are not saved (SLV_NOTEXT), I will make this configurable from the command eventually but look at changing StripLevel in the script to change what information is lossily compressed for now. + +-- Script -- + +Usage: + python3 rtbw.py + +Supported options: + --buffer : Specify a file buffer instead of using memory, can be useful if you plan on keeping large records/archives. (Uhh, it's a little unstable at the moment sorry) + --daemon : Start in daemon mode (see below). + --api : Change the 4chan API url. Can be used to specify the SSL API instead of the plaintext one. The default value is http://api.4chan.org/%s/ (`%s' is required for the board) + --debug: Set the debug flag. Various changes, most useful for starting the daemon without forking. + +-- Daemon control -- + +The daemon listens only on an AF_UNIX socket. Specify the socket file when starting the daemon. (NOTE: It must not exist already) +To control the daemon use rtbwctl.py. All output is in JSON and most commands have no output. +There is no need to keep a PID file since the script forks itself and can be shut down internally. (unless --debug flag is on) + +Usage: + python3 rtbwctl.py + +Supported options: + --data : get and get-clear commands require a minimum post number. Specify 0 for everything. Other commands do not require this. + +Supported commands: + get: Return all posts after the specified post. + clear: Purge whole buffer. + get-clear: Return all posts and purge the buffer atomically. (You should use this insted of just get and then clear to prevent race conditions) + stop: Shut down the daemon. + pause: Keep listening but stop archiving. + resume: Restart after a pause + info: Return JSON object containing info about the daemon. + +There are also a bunch of scripts for quick starting and controlling the daemon (conf/* contains config for these) + + +In production at https://flanchan.moe/rtbw/ + diff --git a/TODO b/TODO index 838f1e4..fe1cd64 100644 --- a/TODO +++ b/TODO @@ -1 +1,4 @@ -Fix spooky skipping issue with file buffers +Fix spooky skipping issue with file buffers. +Make strip level configurable from command. +Fix potential issue involving stickies and missing posts. +Add flag for SSL API. diff --git a/deps b/deps deleted file mode 100644 index fb363f6..0000000 --- a/deps +++ /dev/null @@ -1,3 +0,0 @@ -pylzma -argparse -probably some other stuff