This is the Aug 2019 draft of S.NSA WWW logotron and IRC bot kit, as can be seen presently at http://logs.nosuchlabs.com/log . To make your own installation, you will need: (1) Traditional 'python' 2.7. (2) 'flask' lib for (1). (3) 'psycopg2' lib for (1). (4) 'postgres' (9 or 10). (5) A WWW server that knows how to proxy. To use the kit, you will first need to create a user and DB, e.g.: su - postgres psql create user nsabot createdb; alter role nsabot superuser; create database nsalog; grant all privileges on database nsalog to nsabot ; ... you can take 'super' away from this user after 1st run, it is needed in order to let him load the pg_trgm indexer plugin. Next, run 'init_db.sh' (alter the constants to match the names of your postgres user and the DB), this creates the schema. Then see 'eat.sh' and the 'eat_dump.py' it uses, re how to fill your log archive DB. 'eat_dump.py' eats in Phf's classical format, e.g.: 1926177;1564727032;mp_en_viaje;in the meantime, everyone's invited on trilema & other blogs. where 1926177 is absolute line index (in given chan), 1564727032 is unix epochal timestamp, mp_en_viaje is speaker (if he is 'actioning', there will be a * behind his name), and the remainder of the line is the payload. You WILL need to adjust the constants in 'eat_dump.py', it is not currently capable of eating config file. Set these to your DB and PG user. Now, adjust the constants in 'nsabot.conf' (rename per taste) to specify your IRC params, name of bot, host at which www logger will reside, and other knob values. Adjust the three 'flask' templates in 'templates' subdir to give the desired look and feel for the www end. Currently we are using Phf's classic style sheet, with minor modifications. 'reader.py' takes one mandatory command-line argument: full path to the config above. Same for 'bot.py', which is the IRC bot. Run these via e.g. nohup ./bot.py & ; nohup ./reader.py & and let your proxying WWW server know how to reach the latter's port. For bot.py you will need a registered nick on fleanode (or wherever it is used.) There are no fleanode-specific hacks in the bot, ergo it can be stood up behind ZNC (although this has not been tested.) Certain important features are presently unimplemented, in no order: (1) Backlinkage. (2) Search result pagination. (3) Double-quoted search terms. (4) Paste archiving. (5) Multi-headed IRC bot for weather resistance. (6) Informative eggogology for bot commands. (7) Automatic synchronization with mirrors A ZNC log eater is also required, to properly fill in the archives. This is not yet available at the time of this writing. ############### Aug. 11 Update: ############### (1) Multi-line selection is implemented. (2) User may request export of raw log lines in Phf-classical format. E.g. : http://logs.nosuchlabs.com/log-raw/trilema?istart=1925000&iend=1925500 ############### Aug. 16 Update: ############### (1) Bot: added Phf's algo for uniturd processing ('fallback to latin-1'). (2) Bot: May leave IRC password blank in config for use with unregged bots (3) WWW: 'Checkerboard' colouring; footer links. (4) WWW: Links in log lines now open in new browser tab (a la Phf's log) (5) WWW: Can now be loaded 'in reverse gear', http://...../log?rev=1 (6) WWW: 'Random' knob, takes reader to an arbitrary moment in past log.