- 892C1058BE06D507D51083D944192C163494AAF861C2D68B413DCBF2E6561A79B54EC5530993C4387389F4BFE258AA1C93F8352491CE64D8F8AA1F756C02354C
+ 904C7DDA848F33B172A5541F633EDBBF425EDF7D8BF9C1C9BC257D8033DE2EEFF3742E8D813DD735E34E4A9249D7DF4B4EF3FE3C3D0F1143B25172CB0E2C27D6
logotron/README.txt
(7 . 7)(7 . 14)
13 (2) 'flask' lib for (1).
14 (3) 'psycopg2' lib for (1).
15 (4) 'postgres' (9 or 10).
16 (5) A WWW server that knows how to proxy.
17 (5) A WWW server that can serve WSGI applications (e.g. Apache with mod_wsgi installed).
18 - If installing mod_wsgi for the first time be sure to set your target
19 python version to 2.7 (/etc/portage/make.conf in gentoo/dulap systems)
20
21
22 ####################
23 DB Setup
24 ####################
25
26 To use the kit, you will first need to create a user and DB, e.g.:
27
(17 . 7)(24 . 7)
29 create user nsabot createdb;
30 alter role nsabot superuser;
31 create database nsalog;
32 grant all privileges on database nsalog to nsabot ;
33 grant all privileges on database nsalog to nsabot;
34
35 ... you can take 'super' away from this user after 1st run,
36 it is needed in order to let him load the pg_trgm indexer
(26 . 6)(33 . 11)
38 Next, run 'init_db.sh' (alter the constants to match the
39 names of your postgres user and the DB), this creates the schema.
40
41
42 ####################
43 Importing Logs
44 ####################
45
46 Then see 'eat.sh' and the 'eat_dump.py' it uses, re how to
47 fill your log archive DB. 'eat_dump.py' eats in Phf's classical
48 format, e.g.:
(41 . 137)(53 . 55)
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) Informative eggogology for bot commands.
78 (7) Automatic synchronization with mirrors
79
80 A ZNC log eater is also required, to properly fill in the archives.
81 This is not yet available at the time of this writing.
82
83 ###############
84 Aug. 11 Update:
85 ###############
86
87 (1) Multi-line selection is implemented.
88
89 (2) User may request export of raw log lines in Phf-classical format.
90 E.g. :
91 http://logs.nosuchlabs.com/log-raw/trilema?istart=1925000&iend=1925500
92 See subdir 'logconverters' for scripts to convert ZNC and irssi log formats to Phf's format
93
94
95 ###############
96 Aug. 16 Update:
97 ###############
98
99 (1) Bot: added Phf's algo for uniturd processing ('fallback to latin-1').
100 (2) Bot: May leave IRC password blank in config for use with unregged bots
101 (3) WWW: 'Checkerboard' colouring; footer links.
102 (4) WWW: Links in log lines now open in new browser tab (a la Phf's log)
103 (5) WWW: Can now be loaded 'in reverse gear', http://...../log?rev=1
104 (6) WWW: 'Random' knob, takes reader to an arbitrary moment in past log.
105
106 ###############
107 Sep. 28 Update:
108 ###############
109
110 (1) Bot: incorporated reconnector fixes.
111 (2) Bot: 'seen', 'seen-all', and 'version' knobs implemented.
112 (3) WWW: up/down arrows for mouse-driven operation on pocket comps
113 (4) WWW: double-quotes prevent breakup of search query
114 (Note: still needs improvement to force matching on word boundaries)
115 (5) WWW: demarkation of "action" lines
116 (6) WWW: Raw 'Tape" knob:
117
118 e.g. http://logs.nosuchlabs.com/tape?istart=1937934&iend=1937941
119 returns:
120
121 trilema;1937934;1569444908;asciilifeform;achtung panzers! piz pipe down ?!
122 trilema;1937935;1569444920;diana_coman;seems so
123 trilema;1937936;1569444957;asciilifeform;paging BingoBoingo !
124 trilema;1937937;1569444974;diana_coman;well, apparetly he was connected from piz too, lol
125 trilema;1937938;1569444982;diana_coman;ossasepia.com (pizarro) is down too, yes
126 trilema;1937939;1569445010;asciilifeform;dulap unreachable for 1st time since year+ ago when bb elbowed the mains cord
127 trilema;1937940;1569445073;diana_coman;apparently back on
128 trilema;1937941;1569445079;diana_coman;wb BingoBoingo !
129
130 Still needs a variant of 'eater' that will eat these.
131
132 ###############
133 Oct. 4 Update:
134 ###############
135
136 (1) WWW: Removed ill-conceived 'Tape' knob.
137 (2) Bot: Added silent-disconnection detector.
138
139 Now requires the following value in bot config e.g.:
140 ####################
141 Configuration
142 ####################
143
144 [irc]
145 disc_t = 180
146 Now, adjust the constants in 'nsabot.conf' (rename per taste)
147 to specify your IRC params, name of bot, host at which www
148 logger will reside, and other knob values.
149
150 This represents the currently-recommended interval: 3 minutes.
151 If inactivity on the incoming line (incl. pingism) exceeds this interval,
152 a disconnection is forced. The normal reconnection routine will execute.
153 Set css_file in the conf file to point to your desired CSS file in 'static' subdir.
154 Adjust the 'jinja' templates in 'templates' subdir to give the desired look
155 and feel for the www end IF your CSS changes alone are not sufficient.
156 Currently we are using Phf's classic style sheet, with minor modifications.
157
158 To disable forced disconnects, set disc_t to zero.
159
160 ####################
161 Jul. 2020 Update #1:
162 Running the WWW
163 ####################
164
165 (1) Hide by default chans where no activity in days_hide day (set in config.)
166 (2) Added 'join as guest' link (via 'kiwi' wwwtronic IRC client)
167 (3) Example Apache-WSGI configs.
168
169 ####################
170 Jul. 2020 Update #2:
171 ####################
172 'reader.py' takes one mandatory argument: full path to the config above.
173 - When running as a WSGI module this argument needs to be hardcoded in 'reader.py'
174 - When running locally pass in as a single command-line argument,
175 e.g. `./reader.py path/to/config`
176 - Optionally, when running locally, set FLASK_ENV=development to allow for
177 auto-reloading on file changes (see Flask documentation for more info).
178
179 (1) Fix unclosed 'table' tag from earlier.
180 (2) 'Search all chans' button.
181
182 ####################
183 Jul. 2020 Update #3:
184 Running the Bot
185 ####################
186
187 (1) Automatically skip empty days in date navigation bar. At the same time, handle empty days correctly when these are requested.
188 (2) Handle 'dawn of time' case for any given channel, to avoid infinite loop insanity from search engines.
189 Run bot.by and pass in the path to the same config file as a single command-line
190 argument, e.g. `nohup ./bot.py path/to/config &`
191
192 #####################
193 Aug. 2020 Update #1 :
194 #####################
195
196 (1) Implemented fetch-by-channel-and-index (i.e. /ilog/chan/lineindex links).
197 (2) Automatically adjust link targets of #ba and 'btcbase' log citations to point to this logger, using the syntax in (1). Original text of link is preserved. Dates are handled correctly.
198 (3) Search results now properly paginated, with working 'back' and 'forward' buttons.
199 (4) Fixed ancient unicode bug in eat_dump.py.
200 For bot.py you will need a registered nick on fleanode (or wherever
201 it is used.) There are no fleanode-specific hacks in the bot, ergo
202 it can be stood up behind ZNC (although this has not been tested.)
203
204 #####################
205 Aug. 2020 Update #2 :
206 #####################
207
208 (1) Additional 'back' and 'forward' buttons at the bottom of search result pages.
209 (2) Fix era1/2 link diddler regexps to handle all (AFAIK) known variants correctly.
210 ####################
211 Not Yet Implemented
212 ####################
213
214 Certain important features are presently unimplemented, in no order:
215 (1) Backlinkage.
216 (3) Double-quoted search terms.
217 (4) Paste archiving.
218 (5) Multi-headed IRC bot for weather resistance.
219 (6) Informative eggogology for bot commands.
220 (7) Automatic synchronization with mirrors