logotron_genesis.kv     1 This is the Aug 2019 draft of S.NSA WWW logotron and IRC bot kit,
logotron_genesis.kv     2 as can be seen presently at http://logs.nosuchlabs.com/log .
logotron_genesis.kv     3 
logotron_genesis.kv     4 To make your own installation, you will need:
logotron_genesis.kv     5 
logotron_genesis.kv     6 (1) Traditional 'python' 2.7.
logotron_genesis.kv     7 (2) 'flask' lib for (1).
logotron_genesis.kv     8 (3) 'psycopg2' lib for (1).
logotron_genesis.kv     9 (4) 'postgres' (9 or 10).
logotron_genesis.kv    10 (5) A WWW server that knows how to proxy.
logotron_genesis.kv    11 
logotron_genesis.kv    12 To use the kit, you will first need to create a user and DB, e.g.:
logotron_genesis.kv    13 
logotron_genesis.kv    14 su - postgres
logotron_genesis.kv    15 psql
logotron_genesis.kv    16 
logotron_genesis.kv    17 create user nsabot createdb;
logotron_genesis.kv    18 alter role nsabot superuser;
uptimefix_bye_cac...   19 create database nsalog;
logotron_genesis.kv    20 grant all privileges on database nsalog to nsabot ;
logotron_genesis.kv    21 
logotron_genesis.kv    22 ... you can take 'super' away from this user after 1st run,
logotron_genesis.kv    23 it is needed in order to let him load the pg_trgm indexer
logotron_genesis.kv    24 plugin.
logotron_genesis.kv    25 
logotron_genesis.kv    26 Next, run 'init_db.sh' (alter the constants to match the
logotron_genesis.kv    27 names of your postgres user and the DB), this creates the schema.
logotron_genesis.kv    28 
logotron_genesis.kv    29 Then see 'eat.sh' and the 'eat_dump.py' it uses, re how to
logotron_genesis.kv    30 fill your log archive DB. 'eat_dump.py' eats in Phf's classical
logotron_genesis.kv    31 format, e.g.:
logotron_genesis.kv    32 
logotron_genesis.kv    33 1926177;1564727032;mp_en_viaje;in the meantime, everyone's invited on trilema & other blogs.
logotron_genesis.kv    34 
logotron_genesis.kv    35 where 1926177 is absolute line index (in given chan), 1564727032
logotron_genesis.kv    36 is unix epochal timestamp, mp_en_viaje is speaker (if he is
logotron_genesis.kv    37 'actioning', there will be a * behind his name), and the remainder
logotron_genesis.kv    38 of the line is the payload.
logotron_genesis.kv    39 
logotron_genesis.kv    40 You WILL need to adjust the constants in 'eat_dump.py', it is not
logotron_genesis.kv    41 currently capable of eating config file. Set these to your DB
logotron_genesis.kv    42 and PG user.
logotron_genesis.kv    43 
logotron_genesis.kv    44 Now, adjust the constants in 'nsabot.conf' (rename per taste)
logotron_genesis.kv    45 to specify your IRC params, name of bot, host at which www
logotron_genesis.kv    46 logger will reside, and other knob values.
logotron_genesis.kv    47 
logotron_genesis.kv    48 Adjust the three 'flask' templates in 'templates' subdir to
logotron_genesis.kv    49 give the desired look and feel for the www end. Currently we are using
logotron_genesis.kv    50 Phf's classic style sheet, with minor modifications.
logotron_genesis.kv    51 
logotron_genesis.kv    52 'reader.py' takes one mandatory command-line argument: full path
logotron_genesis.kv    53 to the config above. Same for 'bot.py', which is the IRC bot.
logotron_genesis.kv    54 
logotron_genesis.kv    55 Run these via e.g. nohup ./bot.py & ; nohup ./reader.py &
logotron_genesis.kv    56 and let your proxying WWW server know how to reach the latter's port.
logotron_genesis.kv    57 
logotron_genesis.kv    58 For bot.py you will need a registered nick on fleanode (or wherever
logotron_genesis.kv    59 it is used.) There are no fleanode-specific hacks in the bot, ergo
logotron_genesis.kv    60 it can be stood up behind ZNC (although this has not been tested.)
logotron_genesis.kv    61 
logotron_genesis.kv    62 Certain important features are presently unimplemented, in no order:
logotron_genesis.kv    63 (1) Backlinkage.
logotron_genesis.kv    64 (2) Search result pagination.
logotron_genesis.kv    65 (3) Double-quoted search terms.
logotron_genesis.kv    66 (4) Paste archiving.
logotron_genesis.kv    67 (5) Multi-headed IRC bot for weather resistance.
raw_line_export.kv     68 (6) Informative eggogology for bot commands.
raw_line_export.kv     69 (7) Automatic synchronization with mirrors
logotron_genesis.kv    70 
logotron_genesis.kv    71 A ZNC log eater is also required, to properly fill in the archives.
logotron_genesis.kv    72 This is not yet available at the time of this writing.
raw_line_export.kv     73 
raw_line_export.kv     74 ###############
raw_line_export.kv     75 Aug. 11 Update:
raw_line_export.kv     76 ###############
raw_line_export.kv     77 
raw_line_export.kv     78 (1) Multi-line selection is implemented.
raw_line_export.kv     79 
raw_line_export.kv     80 (2) User may request export of raw log lines in Phf-classical format.
raw_line_export.kv     81     E.g. :
raw_line_export.kv     82     http://logs.nosuchlabs.com/log-raw/trilema?istart=1925000&iend=1925500
uniturds_etc.kv        83 
uniturds_etc.kv        84 
uniturds_etc.kv        85 ###############
uniturds_etc.kv        86 Aug. 16 Update:
uniturds_etc.kv        87 ###############
uniturds_etc.kv        88 
uniturds_etc.kv        89 (1) Bot: added Phf's algo for uniturd processing ('fallback to latin-1').
uniturds_etc.kv        90 (2) Bot: May leave IRC password blank in config for use with unregged bots
uniturds_etc.kv        91 (3) WWW: 'Checkerboard' colouring; footer links.
uniturds_etc.kv        92 (4) WWW: Links in log lines now open in new browser tab (a la Phf's log)
uniturds_etc.kv        93 (5) WWW: Can now be loaded 'in reverse gear', http://...../log?rev=1
uniturds_etc.kv        94 (6) WWW: 'Random' knob, takes reader to an arbitrary moment in past log.
sept_fixes.kv          95 
sept_fixes.kv          96 ###############
sept_fixes.kv          97 Sep. 28 Update:
sept_fixes.kv          98 ###############
sept_fixes.kv          99 
sept_fixes.kv         100 (1) Bot: incorporated reconnector fixes.
sept_fixes.kv         101 (2) Bot: 'seen', 'seen-all', and 'version' knobs implemented.
sept_fixes.kv         102 (3) WWW: up/down arrows for mouse-driven operation on pocket comps
sept_fixes.kv         103 (4) WWW: double-quotes prevent breakup of search query
sept_fixes.kv         104     (Note: still needs improvement to force matching on word boundaries)
sept_fixes.kv         105 (5) WWW: demarkation of "action" lines
sept_fixes.kv         106 (6) WWW: Raw 'Tape" knob:
sept_fixes.kv         107 
sept_fixes.kv         108 e.g. http://logs.nosuchlabs.com/tape?istart=1937934&iend=1937941
sept_fixes.kv         109 returns:
sept_fixes.kv         110 
sept_fixes.kv         111 trilema;1937934;1569444908;asciilifeform;achtung panzers! piz pipe down ?!
sept_fixes.kv         112 trilema;1937935;1569444920;diana_coman;seems so
sept_fixes.kv         113 trilema;1937936;1569444957;asciilifeform;paging BingoBoingo !
sept_fixes.kv         114 trilema;1937937;1569444974;diana_coman;well, apparetly he was connected from piz too, lol
sept_fixes.kv         115 trilema;1937938;1569444982;diana_coman;ossasepia.com (pizarro) is down too, yes
sept_fixes.kv         116 trilema;1937939;1569445010;asciilifeform;dulap unreachable for 1st time since year+ ago when bb elbowed the mains cord
sept_fixes.kv         117 trilema;1937940;1569445073;diana_coman;apparently back on
sept_fixes.kv         118 trilema;1937941;1569445079;diana_coman;wb BingoBoingo !
sept_fixes.kv         119 
sept_fixes.kv         120 Still needs a variant of 'eater' that will eat these.
detect_disconnect.kv  121 
search_all_chans.kv   122 ###############
search_all_chans.kv   123 Oct. 4 Update:
search_all_chans.kv   124 ###############
detect_disconnect.kv  125 
detect_disconnect.kv  126 (1) WWW: Removed ill-conceived 'Tape' knob.
detect_disconnect.kv  127 (2) Bot: Added silent-disconnection detector.
detect_disconnect.kv  128 
detect_disconnect.kv  129 Now requires the following value in bot config e.g.:
detect_disconnect.kv  130 
detect_disconnect.kv  131 [irc]
detect_disconnect.kv  132 disc_t  = 180
detect_disconnect.kv  133 
detect_disconnect.kv  134 This represents the currently-recommended interval: 3 minutes.
detect_disconnect.kv  135 If inactivity on the incoming line (incl. pingism) exceeds this interval,
detect_disconnect.kv  136 a disconnection is forced. The normal reconnection routine will execute.
detect_disconnect.kv  137 
detect_disconnect.kv  138 To disable forced disconnects, set disc_t to zero.
hide_inactive.kv      139 
search_all_chans.kv   140 ####################
search_all_chans.kv   141 Jul. 2020 Update #1:
search_all_chans.kv   142 ####################
hide_inactive.kv      143 
hide_inactive.kv      144 (1) Hide by default chans where no activity in days_hide day (set in config.)
hide_inactive.kv      145 (2) Added 'join as guest' link (via 'kiwi' wwwtronic IRC client)
hide_inactive.kv      146 (3) Example Apache-WSGI configs.
search_all_chans.kv   147 
search_all_chans.kv   148 ####################
search_all_chans.kv   149 Jul. 2020 Update #2:
search_all_chans.kv   150 ####################
search_all_chans.kv   151 
search_all_chans.kv   152 (1) Fix unclosed 'table' tag from earlier.
search_all_chans.kv   153 (2) 'Search all chans' button.
navbar_date_auto.kv   154 
navbar_date_auto.kv   155 ####################
navbar_date_auto.kv   156 Jul. 2020 Update #3:
navbar_date_auto.kv   157 ####################
navbar_date_auto.kv   158 
navbar_date_auto.kv   159 (1) Automatically skip empty days in date navigation bar. At the same time, handle empty days correctly when these are requested.
navbar_date_auto.kv   160 (2) Handle 'dawn of time' case for any given channel, to avoid infinite loop insanity from search engines.
navbar_date_auto.kv   161