-
+ 2209F578062ECC5636E67FCB9904CD26204C832FFD170B373773B6B6E1BD1FB85E79E99BE44A49BB1AABC99CDAE4F6DF4CEF203BDADBE3773C3586048A61888Flogotron/README.txt(0 . 0)(1 . 73)
10 This is the Aug 2019 draft of S.NSA WWW logotron and IRC bot kit,
11 as can be seen presently at http://logs.nosuchlabs.com/log .
12
13 To make your own installation, you will need:
14
15 (1) Traditional 'python' 2.7.
16 (2) 'flask' lib for (1).
17 (3) 'psycopg2' lib for (1).
18 (4) 'postgres' (9 or 10).
19 (5) A WWW server that knows how to proxy.
20
21 To use the kit, you will first need to create a user and DB, e.g.:
22
23 su - postgres
24 psql
25
26 create user nsabot createdb;
27 alter role nsabot superuser;
28 createdb nsalog;
29 grant all privileges on database nsalog to nsabot ;
30
31 ... you can take 'super' away from this user after 1st run,
32 it is needed in order to let him load the pg_trgm indexer
33 plugin.
34
35 Next, run 'init_db.sh' (alter the constants to match the
36 names of your postgres user and the DB), this creates the schema.
37
38 Then see 'eat.sh' and the 'eat_dump.py' it uses, re how to
39 fill your log archive DB. 'eat_dump.py' eats in Phf's classical
40 format, e.g.:
41
42 1926177;1564727032;mp_en_viaje;in the meantime, everyone's invited on trilema & other blogs.
43
44 where 1926177 is absolute line index (in given chan), 1564727032
45 is unix epochal timestamp, mp_en_viaje is speaker (if he is
46 'actioning', there will be a * behind his name), and the remainder
47 of the line is the payload.
48
49 You WILL need to adjust the constants in 'eat_dump.py', it is not
50 currently capable of eating config file. Set these to your DB
51 and PG user.
52
53 Now, adjust the constants in 'nsabot.conf' (rename per taste)
54 to specify your IRC params, name of bot, host at which www
55 logger will reside, and other knob values.
56
57 Adjust the three 'flask' templates in 'templates' subdir to
58 give the desired look and feel for the www end. Currently we are using
59 Phf's classic style sheet, with minor modifications.
60
61 'reader.py' takes one mandatory command-line argument: full path
62 to the config above. Same for 'bot.py', which is the IRC bot.
63
64 Run these via e.g. nohup ./bot.py & ; nohup ./reader.py &
65 and let your proxying WWW server know how to reach the latter's port.
66
67 For bot.py you will need a registered nick on fleanode (or wherever
68 it is used.) There are no fleanode-specific hacks in the bot, ergo
69 it can be stood up behind ZNC (although this has not been tested.)
70
71 Certain important features are presently unimplemented, in no order:
72 (1) Backlinkage.
73 (2) Search result pagination.
74 (3) Double-quoted search terms.
75 (4) Paste archiving.
76 (5) Multi-headed IRC bot for weather resistance.
77 (6) 'Ecologically clean' export of raw log material.
78 (7) Informative eggogology for bot commands.
79 (8) Automatic synchronization with mirrors (see 6)
80
81 A ZNC log eater is also required, to properly fill in the archives.
82 This is not yet available at the time of this writing.