tree checksum vpatch file split hunks
all signers: asciilifeform diana_coman
antecedents: multsel_and_datefix.kv rle_errata.kv logotron_genesis.kv raw_line_export.kv irssi2tmsr.kv
press order:
patch:
(3 . 3)(3 . 4)
5 589662 raw_line_export asciilifeform "Export lines in Phf format; fix for debug knob."
6 589674 rle_errata asciilifeform "Date arrow enable fix."
7 589783 irssi2tmsr diana_coman "Converter of irssi logs to the tmsr format used by the logotron. Added authors in MANIFEST.TXT."
8 590448 uniturds_etc asciilifeform "Phf's algo for uniturd digestion; cosmetic improvements to WWW displayer."
- 45FA8F8A0D6E12EDE0C94BA6B85A7B43B8409BA841127DECB2409DF358DBB5C3EE6C5F2B5C17F3F5FA8829ABC7AC38C979BF628CE447BD419ACE2078CF3D5D8D(80 . 3)(80 . 15)
13 (2) User may request export of raw log lines in Phf-classical format.
14 E.g. :
15 http://logs.nosuchlabs.com/log-raw/trilema?istart=1925000&iend=1925500
16
17
18 ###############
19 Aug. 16 Update:
20 ###############
21
22 (1) Bot: added Phf's algo for uniturd processing ('fallback to latin-1').
23 (2) Bot: May leave IRC password blank in config for use with unregged bots
24 (3) WWW: 'Checkerboard' colouring; footer links.
25 (4) WWW: Links in log lines now open in new browser tab (a la Phf's log)
26 (5) WWW: Can now be loaded 'in reverse gear', http://...../log?rev=1
27 (6) WWW: 'Random' knob, takes reader to an arbitrary moment in past log.
- A168B17F05E71BEC4ED700EDA6AE588D080F41D1B93842044709FC8349D1A44116692FCCCDC10861DC1E4E317F02F7456E70DCF66945FD9451D83B83F09A85E4(229 . 7)(229 . 10)- FC6B0036D74F0369666FCBE199CDA20733E2B5F384C4653CE6EEBC294C61AB14AD70DE596F34979EC91896E1A4D298153628F13BA430D8190D6360F0102FDE39
32 # Auth to server
33 send("NICK %s\r\n" % Nick)
34 send("USER %s %s %s :%s\r\n" % (Nick, Nick, Nick, Nick))
35 send("NICKSERV IDENTIFY %s %s\r\n" % (Nick, Pass))
36
37 # If this is a production bot, rather than test, there will be a PW:
38 if Pass != "":
39 send("NICKSERV IDENTIFY %s %s\r\n" % (Nick, Pass))
40
41 time.sleep(Join_Delay) # wait to join until fleanode eats auth
42
(258 . 7)(261 . 10)
44 connected = False
45 continue
46 try:
47 data = data.strip(b'\r\n').decode("utf-8")
48 try:
49 data = data.strip(b'\r\n').decode("utf-8")
50 except UnicodeDecodeError:
51 data = data.strip(b'\r\n').decode('latin-1')
52 for l in data.splitlines():
53 received_line(l)
54 continue
(243 . 7)(243 . 9)- 587CCF877BA1BFF6DFA4547EBFED8FAE1B071CF243FA4BD77F56F91C0A1B6A692137FF9DC5B458C34783AC632BCB83ABAC664073AB82D79649709810F4CF9C0A
59
60
61 # Regexps used in format_logline:
62 boxlinks_re = re.compile('\[\s*<a href="(http[^ \[\]]+)">[^ <]+</a>\s*\]\[([^\[\]]+)\]')
63 boxlinks_re = re.compile(
64 '\[\s*<a href="(http[^ \[\]]+)"[^>]*>[^ <]+</a>\s*\]\[([^\[\]]+)\]')
65
66 stdlinks_re = re.compile('(http[^ \[\]]+)')
67
68
(252 . 10)(254 . 12)
70 payload = html_escape(l['payload'])
71
72 # Format ordinary links:
73 payload = re.sub(stdlinks_re, r'<a href="\1">\1</a>', payload)
74 payload = re.sub(stdlinks_re,
75 r'<a href="\1" target=\'_blank\'>\1</a>', payload)
76
77 # Now also format [link][text] links :
78 payload = re.sub(boxlinks_re, r'<a href="\1">\2</a>', payload)
79 payload = re.sub(boxlinks_re,
80 r'<a href="\1" target=\'_blank\'>\2</a>', payload)
81
82 # If this is a search result, illuminate the matched strings:
83 if highlights != []:
(309 . 12)(313 . 29)
85 chan,
86 next_day_txt)
87
88 # s += """<span><a href="{0}log/{1}?rev=1">Reverse</a></span>""".format(
89 # get_base(), chan)
90
91 return s
92
93 # Make above callable from inside htm templater:
94 app.jinja_env.globals.update(generate_navbar=generate_navbar)
95
96
97 @app.route('/rnd/<chan>')
98 def rnd(chan):
99 # Handle rubbish chan:
100 if chan not in Channels:
101 return redirect(url_for('log'))
102
103 rnd_line = query_db(
104 '''select * from loglines where chan=%s
105 order by random() limit 1 ;''',
106 [chan], one=True)
107
108 return redirect(line_url(rnd_line))
109
110
111 @app.route('/log/<chan>/<date>')
112 @app.route('/log/<chan>', defaults={'date': None})
113 @app.route('/log/', defaults={'chan': Default_Chan, 'date': None})
(327 . 6)(348 . 9)
115 # Get possible selection start and end
116 sel_start = request.args.get('ss', default = 0, type = int)
117 sel_end = request.args.get('se', default = 0, type = int)
118
119 # Get possible 'reverse gear'
120 rev = request.args.get('rev', default = 0, type = int)
121
122 # Get current time
123 now = datetime.now()
(358 . 13)(382 . 18)
125 and t between %s and %s order by idx asc;''',
126 [chan, day_start, day_end], one=False)
127
128 # Optional 'reverse gear' knob:
129 if rev == 1:
130 lines.reverse()
131
132 # Return the HTMLized text
133 return render_template('log.html',
134 chan = chan,
135 loglines = lines,
136 sel = (sel_start, sel_end),
137 date = date,
138 tail = tail)
139 tail = tail,
140 rev = not rev)
141
142
143 @app.route('/log-raw/<chan>')
(35 . 7)(35 . 6)- F687B56110C1F5A947F95B3767DF3F224F9580A1751CEE8F27DC45A099DD1416C3AFE6BB205468B7D529D5A1E73E8224FE52AA18158F5CA2E7F8874E74E698A3
148 }
149
150 div {
151 white-space: pre-wrap;
152 }
153
154 .bot,
(44 . 14)(43 . 26)
156 color: #777;
157 font-weight: normal;
158 }
159
160 .loglines {
161 float:left;
162 clear:none;
163 }
164
165 .loglines div:nth-child(2n) {
166 }
167
168 .loglines div:nth-child(2n+1) {
169 background: #f5f5f5;
170 }
171
172 .mention {
173 background: lightyellow;
174 background: lightyellow !important;;
175 }
176
177 :target,
178 .active {
179 background: lightyellow;
180 background: lightyellow !important;;
181 }
182
183 img.inline {
(72 . 12)(83 . 12)
185 #navbar {
186 margin-bottom: 1em;
187 }
188
189
190 .highlight {
191 background: yellow;
192 background: yellow !important;;
193 padding: 1px;
194 }
195
196
197 </style>
198 </head>
199
(88 . 7)(99 . 7)
201 <tr>
202 <td>
203 <a href="http://nosuchlabs.com">
204 <img src="http://logs.nosuchlabs.com/static/snsa_small.jpg"
205 <img src="{{ url_for('static', filename='snsa.jpg') }}"
206 align="left"
207 alt="No Such lAbs"/>
208 </a>
(100 . 7)(111 . 7)
210
211 <td>
212 <a href="http://pizarroisp.net">
213 <img src="http://logs.nosuchlabs.com/static/piz_small.jpg"
214 <img src="{{ url_for('static', filename='piz.jpg') }}"
215 align="right"
216 alt="Pizarro"/>
217 </a>
(122 . 6)(133 . 11)
219
220 {% block body %}{% endblock %}
221
222 <hr>
223
224 <div align="center">
225 <a href="/rnd/{{ chan }}">Random({{ chan }})</a> | <a href="{{ url_for('static', filename='log_db.gz') }}">Download daily DB snapshot</a> | <a href="http://www.loper-os.org/?p=3452">Get Source Code</a>
226 </div>
227 </body>
228
229 </html>
(8 . 9)(8 . 11)
234
235 <div id='navbar'>{{ generate_navbar(date, tail, chan) | safe }}</div>
236
237 {% for l in loglines %}
238 {{ format_logline(l, [], sel) | safe }}
239 {% endfor %}
240 <div class='loglines'>
241 {% for l in loglines %}
242 {{ format_logline(l, [], sel) | safe }}
243 {% endfor %}
244 </div>
245
246 <div id='navbar'>{{ generate_navbar(date, tail, chan) | safe }}</div>
247