Debian Codegraph @

PKG-INFO

raw
1 Metadata-Version: 2.1
2 Name: irclog2html
3 Version: 4.0.0
4 Summary: Convert IRC logs to HTML
5 Home-page: https://mg.pov.lt/irclog2html/
6 Author: Marius Gedminas
7 Author-email: [email protected]
8 License: GPL v2 or v3
9 Keywords: irc log colorizer html wsgi
10 Platform: any
11 Classifier: Development Status :: 4 - Beta
12 Classifier: Intended Audience :: System Administrators
13 Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
14 Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
15 Classifier: Operating System :: OS Independent
16 Classifier: Programming Language :: Python :: 3.7
17 Classifier: Programming Language :: Python :: 3.8
18 Classifier: Programming Language :: Python :: 3.9
19 Classifier: Programming Language :: Python :: 3.10
20 Classifier: Programming Language :: Python :: 3.11
21 Classifier: Programming Language :: Python :: 3.12
22 Classifier: Programming Language :: Python :: 3.13
23 Classifier: Programming Language :: Python :: Implementation :: CPython
24 Classifier: Programming Language :: Python :: Implementation :: PyPy
25 Requires-Python: >=3.7
26 Description-Content-Type: text/x-rst
27 License-File: COPYING
28 Provides-Extra: test
29 Requires-Dist: zope.testing; extra == "test"
30
31 ===========
32 irclog2html
33 ===========
34
35 Converts IRC log files to HTML with pretty colours.
36
37
38 Quick start
39 ===========
40
41 Installation::
42
43 pip install irclog2html
44
45 Quick usage for a single log file::
46
47 irclog2html --help
48 irclog2html filename.log (produces filename.log.html)
49
50 Mass-conversion of logs (one file per day, with YYYY-MM-DD in the filename)
51 with next/prev links, with mtime checks, usable from cron::
52
53 logs2html directory/ (looks for *.log and *.log.gz, produces *.log.html)
54
55
56 Configuration files
57 ===================
58
59 Since you probably don't want to keep specifying the same options on the
60 command line every time you run logs2html, you can create a config file.
61 For example::
62
63 -t 'IRC logs for #mychannel'
64 -p 'IRC logs for #mychannel for '
65 # the following needs some extra Apache setup to enable the CGI/WSGI script
66 --searchbox
67 # where we keep the logs
68 /full/path/to/directory/
69
70 Use it like this::
71
72 logs2html -c /path/to/mychannel.conf
73
74 Lines starting with a ``#`` are ignored. Other lines are interpreted as
75 command-line options.
76
77 The order matters: options on the command line before the ``-c FILE`` will
78 be overriden by option in the config file. Options specified after ``-c FILE``
79 will override the options in the config file.
80
81 You can include more than one config file by repeating ``-c FILE``. You
82 can include config files from other config files. You can even create loops of
83 config files and then watch and laugh manically as logs2html sits there burning
84 your CPU.
85
86
87 CGI script for log searching
88 ============================
89
90 .. warning::
91 The script can be easily abused to cause a denial of service attack; it
92 parses *all* log files every time you perform a search.
93
94 You can generate search boxes on IRC log pages by passing the ``--searchbox``
95 option to ``logs2html``. Here's an example Apache config snippet that makes
96 it work::
97
98 RewriteRule ^/my-irclog/search/$ /my-irclog/search [R,L]
99 ScriptAlias /my-irclog/search /usr/local/bin/irclogsearch
100 <Location /my-irclog/search>
101 SetEnv IRCLOG_LOCATION "/var/www/my-irclog/"
102 # Uncomment the following if your log files use a different format
103 #SetEnv IRCLOG_GLOB "*.log.????-??-??"
104 # (this will also automatically handle *.log.????-??-??.gz)
105 </Location>
106
107
108 WSGI script for log serving
109 ===========================
110
111 .. warning::
112 The script can be easily abused to cause a denial of service attack; it
113 parses *all* log files every time you perform a search.
114
115 There's now an experimental WSGI script that can generate HTML for the
116 logs on the fly. You can use it if you don't like cron scripts and CGI.
117
118 Here's an example Apache config snippet::
119
120 WSGIScriptAlias /irclogs /usr/local/bin/irclogserver
121 <Location /irclogs>
122 SetEnv IRCLOG_LOCATION "/var/www/my-irclog/"
123 # Uncomment the following if your log files use a different format
124 #SetEnv IRCLOG_GLOB "*.log.????-??-??"
125 # (this will also automatically handle *.log.????-??-??.gz)
126 </Location>
127
128 Currently it has certain downsides:
129
130 - configuration is very limited, e.g you cannot specify titles or styles
131 or enable dircproxy mode
132 - HTML files in the irc log directory will take precedence over
133 dynamically-generated logs even if they're older than the corresponding
134 log file (but on the plus side you can use that to have dynamic search
135 via WSGI, but keep statically-generated HTML files with your own config
136 tweaks)
137
138
139 WSGI script for multi-channel log serving
140 =========================================
141
142 .. warning::
143 The script can be easily abused to cause a denial of service attack; it
144 parses *all* log files every time you perform a search.
145
146 The experimental WSGI script can serve logs for multiple channels::
147
148 WSGIScriptAlias /irclogs /usr/local/bin/irclogserver
149 <Location /irclogs>
150 SetEnv IRCLOG_CHAN_DIR "/var/www/my-irclog/"
151 # Uncomment the following if your log files use a different format
152 #SetEnv IRCLOG_GLOB "*.log.????-??-??"
153 # (this will also automatically handle *.log.????-??-??.gz)
154 </Location>
155
156 Now ``/irclogs`` will show a list of channels (subdirectories under
157 ``/var/www/my-irclog/``), and ``/irclogs/channel/`` will show the
158 date index for that channel.
159
160
161 Misc
162 ====
163
164 Website: https://mg.pov.lt/irclog2html/
165
166 Bug tracker:
167 https://github.com/mgedmin/irclog2html/issues
168
169 Licence: GPL v2 or v3 (https://www.gnu.org/copyleft/gpl.html)
170
171 |buildstatus|_ |appveyor|_ |coverage|_
172
173 .. |buildstatus| image:: https://github.com/mgedmin/irclog2html/workflows/build/badge.svg?branch=master
174 .. _buildstatus: https://github.com/mgedmin/irclog2html/actions
175
176 .. |appveyor| image:: https://ci.appveyor.com/api/projects/status/github/mgedmin/irclog2html?branch=master&svg=true
177 .. _appveyor: https://ci.appveyor.com/project/mgedmin/irclog2html
178
179 .. |coverage| image:: https://coveralls.io/repos/mgedmin/irclog2html/badge.svg?branch=master
180 .. _coverage: https://coveralls.io/r/mgedmin/irclog2html
181
182
183
184 Changelog
185 =========
186
187 4.0.0 (2024-10-17)
188 ------------------
189
190 - Remove CGI support if you're using Python 3.13 or newer. You'll have to
191 use the WSGI support instead.
192
193 - Add support for Python 3.12 and 3.13.
194
195
196 3.0.0 (2023-08-28)
197 ------------------
198
199 - Drop support for Python 2.7 and 3.6.
200
201 - Add support for Python 3.10 and 3.11.
202
203 - Make permalinks permanent even from the latest.html file, by emitting the
204 filename in the links.
205
206 - Add <meta name="viewport"> to set initial scale to 1 for improved mobile
207 experience (`PR 32 <https://github.com/mgedmin/irclog2html/pull/32>`_).
208
209 - Support logs files created by `ii (Irc it) <https://tools.suckless.org/ii/>`_
210 (`PR 33 <https://github.com/mgedmin/irclog2html/pull/33>`_).
211
212
213 2.17.3 (2021-07-08)
214 -------------------
215
216 - Add support for Python 3.8 and 3.9.
217
218 - Drop support for Python 3.5.
219
220 - Fix a bug where specifying --output-dir (-o) to logs2html would mistakenly
221 skip generating some HTML files if they existed in the source directory
222 (`issue 29 <https://github.com/mgedmin/irclog2html/issues/29>`_).
223
224
225 2.17.2 (2019-04-23)
226 -------------------
227
228 - Drop support for Python 3.4.
229
230
231 2.17.1 (2018-11-25)
232 -------------------
233
234 - Add support for Python 3.7.
235
236 - Drop support for Python 3.3.
237
238 - Support ``python -m irclog2html`` as shortcut for
239 ``python -m irclog2html.irclog2html``.
240
241 - Make irclogserver ignore hidden directories (such as .git).
242
243
244 2.17.0 (2018-02-21)
245 -------------------
246
247 - Support `ii <https://tools.suckless.org/ii/>`_ logs which use Unix
248 timestamps (https://github.com/mgedmin/irclog2html/pull/21).
249 Pull request by Cédric Krier.
250
251
252 2.16.0 (2017-12-20)
253 -------------------
254
255 - Support Python 3.6.
256
257 - Fix for duplicated lines with the same time where the resulting HTML ``id``
258 anchors would evolve into long form like "t22:24:49-2-3-4-5-6-7-8-9-10"
259 instead of "t22:24:49-10" resulting in significant output file size growth
260 in some cases.
261
262 - Add --output-dir (-o) parameter to logs2html so you can place the generated
263 HTML files in a directory different from the input directory (`PR #20
264 <https://github.com/mgedmin/irclog2html/issues/#20>`_).
265
266
267 2.15.3 (2016-12-08)
268 -------------------
269
270 - In some circumstances parts of a message up to the last '>' could be lost
271 (https://github.com/mgedmin/irclog2html/issues/19).
272
273
274 2.15.2 (2016-10-07)
275 -------------------
276
277 - ``irclogserver`` channel list is now split into old channels and active
278 channels, detected by checking whether the directory modification date
279 is newer or older than 7 days.
280
281 - 2nd-level headings now have the same color as 1st-level headings.
282
283 - ``irclogserver`` no longer shows a 404 if you omit the trailing ``/``
284 after a channel name in the URL.
285
286
287 2.15.1 (2016-09-25)
288 -------------------
289
290 - Lines with the same timestamp now get different HTML anchors
291 (https://github.com/mgedmin/irclog2html/issues/17). Thanks
292 to Bryan Bishop for the original pull request.
293
294
295 2.15.0 (2016-09-25)
296 -------------------
297
298 - There's a new ``irclogserver`` script that can be used to serve
299 dynamically-generated IRC logs and perform search. It can also be
300 deployed via WSGI. Portions contributed by Albertas Agejevas
301 (https://github.com/mgedmin/irclog2html/pull/9).
302
303 - Index pages group the logs by month
304 (https://github.com/mgedmin/irclog2html/issues/12).
305
306 - Drop support for Python 2.6.
307
308
309 2.14.0 (2014-12-12)
310 -------------------
311
312 - Add -o option to specify the output file name. Patch by Moises Silva
313 (https://github.com/mgedmin/irclog2html/pull/7).
314
315
316 2.13.1 (2014-02-01)
317 -------------------
318
319 - Add support for Windows (e.g. refrain from creating latest.log.html
320 symlinks).
321
322
323 2.13.0 (2013-12-18)
324 -------------------
325
326 - Handle gzipped files transparently
327 (https://github.com/mgedmin/irclog2html/issues/5).
328
329
330 2.12.1 (2013-03-22)
331 -------------------
332
333 * Fix AttributeError in irclogsearch on Python 2.7
334 (https://github.com/mgedmin/irclog2html/issues/1).
335
336
337 2.12.0 (2013-03-18)
338 -------------------
339
340 * Moved to Github.
341
342 * Add support for Python 3.3.
343
344 * Drop support for Python 2.4 and 2.5.
345
346 * Fix URL linkifier to not include trailing punctuation (LP#1155906).
347
348
349 2.11.1 (2013-03-17)
350 -------------------
351
352 * logs2html also accepts filenames that contain YYYYMMDD dates (in addition to
353 YYYY-MM-DD). Patch by Holger Just. Fixes LP#1031642.
354
355
356 2.11.0 (2012-07-30)
357 -------------------
358
359 * irclogsearch can be told about the filename pattern of log files via an
360 environment variable (IRCLOG_GLOB). Patch by Jonathan Kinred.
361
362
363 2.10.0 (2012-02-12)
364 -------------------
365
366 * New option: --glob-pattern. Patch by Albertas Agejevas.
367 Fixes LP#912310.
368
369 * Links in logs are marked with rel="nofollow". Patch by Matt Wheeler.
370 Fixes LP#914553.
371
372 * New option: --version.
373
374 * New option: -c, --config=FILE.
375
376
377 2.9.2 (2011-01-16)
378 ------------------
379
380 * Support XChat Latin/Unicode hybrid encoding (http://xchat.org/encoding/).
381 Fixes LP#703622.
382
383 * irclog2html copies irclog.css file into the destination directory.
384 Fixes LP#608727.
385
386
387 2.9.1 (2010-08-06)
388 ------------------
389
390 * Make sure irclog.css is installed in the right place; logs2html needs it.
391
392
393 2.9 (2010-08-06)
394 ----------------
395
396 * Restructured source tree, made irclogs2html into a package, added setup.py,
397 buildout.cfg, bootstrap.py, Makefile, HACKING.txt; moved old porting test
398 suite into a subdirectory (porting).
399
400 * logs2html copies irclog.css file into the destination directory.
401
402 * Released into PyPI.
403
404
405 2.8 (2010-07-22)
406 ----------------
407
408 * Added README.txt and CHANGES.txt.
409
410 * Support dircproxy log files (new date format: "[15 Jan 08:42]",
411 strip ident and IP address from nicknames). Patch by Paul Frields.
412
413 * New option: --dircproxy also makes irclog2html strip a single leading
414 '+' or '-' from messages.
415
416
417 2.7.1 (2009-04-30)
418 ------------------
419
420 * Bug in logs2html.py error reporting, reported by Ondrej Baudys.
421
422
423 2.7 (2008-06-10)
424 ----------------
425
426 * New style: mediawiki. Patch by Ian Weller.
427
428
429 2.6 (2007-10-30)
430 ----------------
431
432 * Support another date format (Oct 17 10:53:26). Patch by Matthew Barnes.
433
434
435 2.5.1 (2007-03-22)
436 ------------------
437
438 * logs2html.py: add a stable link to the latest log file
439 (suggested by Chris Foster).
440
441
442 2.5 (2007-01-22)
443 ----------------
444
445 * New option: --searchbox.
446
447 * Search CGI script improvements (e.g. put newest matches on top).
448
449
450 2.4 (2006-12-11)
451 ----------------
452
453 * Added a sample CGI script for brute-force log searches.
454
455
456 2.3 (2005-03-08)
457 ----------------
458
459 * Use xhtmltable style by default.
460
461 * Added a copy of the navbar at the bottom.
462
463
464 2.2 (2005-02-04)
465 ----------------
466
467 * Support supybot's ChannelLogger date format (e.g. 02-Feb-2004).
468
469 * Fixed broken timestamp hyperlinks in xhtml/xhtmltable styles.
470
471 * CSS tweaks.
472
473
474 2.1mg (2005-01-09)
475 ------------------
476
477 * Ported irclog2html.pl version 2.1 by Jeff Waugh from Perl to Python.
478
479 * New styles: xhtml, xhtmltable.
480
481 * New options: --title, --{prev,index,next}-{url,title}
482
483 * Removed hardcoded nick colour preferences for jdub, cantaker and chuckd
484
485 * Bugfix: colours are preserver accross nick changes (irclog2html.pl tried to
486 do that, but had a bug in a regex)
487
488 * Added ISO8601 timestamp support (e.g. 2005-01-09T12:43:11).
489
490 * More careful URL linkification (stop at ', ", ), >).
491
492 * Added logs2html.py script for mass-conversion of logs.
493
494 * Added support for xchat log files.
495
496 * Added xchatlogsplit.py script for splitting xchat logs on day boundaries so they're suitable as input for logs2html.py.