Changes between Version 23 and Version 24 of IrcLogsPlugin


Ignore:
Timestamp:
Jul 21, 2015, 8:02:27 AM (9 years ago)
Author:
figaro
Comment:

Cosmetic changes, tagged with license

Legend:

Unmodified
Added
Removed
Modified
  • IrcLogsPlugin

    v23 v24  
    11[[PageOutline(2-5,Contents,pullout)]]
    2 = IRC Logs Plugin =
    3 
    4 == Description ==
    5 
    6 Display logs of an IRC channel in trac
    7 
    8 == Bugs/Feature Requests ==
    9 
    10 Existing bugs and feature requests for IrcLogsPlugin are [query:status!=closed&component=IrcLogsPlugin&order=priority here]. If you have any issues, create a
    11 [/newticket?component=IrcLogsPlugin&owner=pacopablo new ticket].
    12 
    13 === Beta Features ===
    14 
    15  * Multi-channel support
     2
     3= IRC Logs Plugin
     4
     5== Description
     6
     7This plugin displays logs of an IRC channel in Trac.
     8
     9Key features:
     10 * Multi-channel support.
    1611 * JS calendar provided by jquery-ui (much prettier).
    17  * Hard pyndexter dependency removed
    18  * Out-of-the-box gozerbot support
    19  * More flexible parser
    20    * configuration based (add new formats with no code changes)
    21    * multi-file support (some loggers split logs into different files, gozerbot simple format for example)
    22  * DB backend support (look at the gozerbot chatlog plugin to create db irclogs)
    23  * Better timezone support, logs are displayed in the user's timezone
    24  * Unit tests
    25 
    26 === Beta Issues ===
     12 * Hard pyndexter dependency removed.
     13 * Out-of-the-box gozerbot support.
     14 * More flexible parser:
     15   * configuration based (add new formats with no code changes).
     16   * multi-file support (some loggers split logs into different files, gozerbot simple format for example).
     17 * DB backend support (look at the gozerbot chatlog plugin to create db irclogs).
     18 * Better timezone support, logs are displayed in the user's timezone.
     19 * Unit tests.
     20
     21=== Known issues
    2722 
    28  * Search is totally busted.  It's on my list.
    29  * Days without logs are no longer shaded in the calendar.  This is because we are using the user's timezone and it's much harder to tell what days have logs without doing an insane amount of parsing on each request.  I hope to have some caching in the future that will allow this feature to come back.  For most ppl it's not a problem because there is at least one message in their irc channel everyday.
    30 
    31 == Download and Source ==
     23 * Search is busted. It's on my list.
     24 * Days without logs are no longer shaded in the calendar. This is because we are using the user's timezone and it's much harder to tell what days have logs without doing an insane amount of parsing on each request. I hope to have some caching in the future that will allow this feature to come back. For most people it's not a problem because there is at least one message in their irc channel everyday.
     25
     26== Bugs/Feature Requests
     27
     28Existing bugs and feature requests for IrcLogsPlugin are [query:status!=closed&component=IrcLogsPlugin&order=priority here].
     29
     30If you have any issues, create a [/newticket?component=IrcLogsPlugin new ticket].
     31
     32[[TicketQuery(component=IrcLogsPlugin&group=type,format=progress)]]
     33
     34== Download and Source
    3235
    3336Download the  [download:irclogsplugin zipped source], check out [/svn/irclogsplugin using Subversion], or [source:irclogsplugin browse the source] with Trac.
    3437
    35 == Installation ==
    36 
    37 Run "easy_install http://trac-hacks.org/svn/irclogsplugin/0.10/" for 0.10.4 trac installations (not supported)
    38 
    39 Run "easy_install http://trac-hacks.org/svn/irclogsplugin/0.11/" for 0.11+ trac installations
    40 
    41 Run "easy_install http://trac-hacks.org/svn/irclogsplugin/parsing_refactor/" for cutting edge beta version (0.11+ trac)
    42 
    43 The IrcLogsPlugin 0.11 depends on the http://swapoff.org/wiki/pyndexter python indexer.  The beta version doesn't require pyndexter, but it will be needed for search capability.  (It is installed automatically by easy_install)
    44 
    45 == Configuration 0.11 ==
    46 
    47 In your trac.ini file add these:
    48 
    49 Under [Components], add:
    50 {{{
    51  irclogs.irclogsplugin = enabled
    52 }}}
    53 
    54 Under [irclogs], add:
    55 {{{
    56  path = /path/to/log/file/ChannelLogger
    57  indexer = builtin:///var/www/trac/indexer/irclogs.idx?cache=true
    58  prefix = #roomname
    59 }}}
    60 
    61 For 0.11 add this to [irclogs]:
    62 {{{
    63  path = /path/to/log/file/ChannelLogger
    64  indexer = builtin:///var/www/trac/indexer/irclogs.idx?cache=true
    65  file_format = #roomname.%Y%m%d.log
    66  navigation_button = irclogs
    67 }}}
    68 
    69 This module was written assuming the use of [http://supybot.com/ supybot] logs.  You will need to configure your supybot to output in the correct format (these are not the default for supybot):
    70 {{{
    71  config supybot.log.timestampformat %Y-%m-%d %H:%M:%S |
    72  config supybot.plugins.channellogger true
    73  config supybot.plugins.channellogger.directories false
    74  config supybot.plugins.channellogger.filenametimestamp %Y%m%d
    75  config supybot.plugins.channellogger.rotatelogs true
     38== Installation
     39
     40Run "easy_install http://trac-hacks.org/svn/irclogsplugin/0.10/" for 0.10.4 Trac installations (not supported).
     41
     42Run "easy_install http://trac-hacks.org/svn/irclogsplugin/0.11/" for 0.11+ Trac installations.
     43
     44Run "easy_install http://trac-hacks.org/svn/irclogsplugin/parsing_refactor/" for cutting edge beta version (0.11+ Trac).
     45
     46The IrcLogsPlugin 0.11 depends on the http://swapoff.org/wiki/pyndexter python indexer. The beta version doesn't require pyndexter, but it will be needed for search capability. It is installed automatically by easy_install.
     47
     48== Configuration 0.11
     49
     50In your `trac.ini file` add these:
     51
     52{{{#!ini
     53[components]
     54irclogs.irclogsplugin = enabled
     55...
     56[irclogs]
     57path = /path/to/log/file/ChannelLogger
     58indexer = builtin:///var/www/trac/indexer/irclogs.idx?cache=true
     59prefix = #roomname
     60}}}
     61
     62For 0.11 add this:
     63{{{#!ini
     64[irclogs]
     65path = /path/to/log/file/ChannelLogger
     66indexer = builtin:///var/www/trac/indexer/irclogs.idx?cache=true
     67file_format = #roomname.%Y%m%d.log
     68navigation_button = irclogs
     69}}}
     70
     71This module was written assuming the use of [http://supybot.com/ supybot] logs. You will need to configure your supybot to output in the correct format (these are not the default for supybot):
     72{{{
     73config supybot.log.timestampformat %Y-%m-%d %H:%M:%S |
     74config supybot.plugins.channellogger true
     75config supybot.plugins.channellogger.directories false
     76config supybot.plugins.channellogger.filenametimestamp %Y%m%d
     77config supybot.plugins.channellogger.rotatelogs true
    7678}}}
    7779
    7880The 0.11 version of the plugin expects a different `timestampformat`:
    7981{{{
    80  config supybot.log.timestampformat %Y-%m-%dT%H:%M:%S
    81 }}}
    82 
    83 To (re)index your log files, use this [attachment:"indexer.py" pydexter indexing python script].  Be sure to edit the two variables for file locations in the script.
     82config supybot.log.timestampformat %Y-%m-%dT%H:%M:%S
     83}}}
     84
     85To (re)index your log files, use this [attachment:"indexer.py" pydexter indexing python script]. Be sure to edit the two variables for file locations in the script.
    8486
    8587'''Note:''' In order to enable indexing for 0.11, you'll currently need a patch, see comment:ticket:1183:6.
    8688
    87 == Configuration Beta ==
    88 
    89 === Quick Config ===
    90 
    91 It is extremely simple to setup irclogs with supy bot.  Just make sure the user running the trac process has access to the log files.
    92 
    93 {{{
     89== Configuration Beta
     90
     91=== Quick Configuration
     92
     93It is simple to setup irclogs with supy bot. Just make sure the user running the Trac process has access to the log files:
     94
     95{{{#!ini
    9496[components]
    9597irclogs.* = enabled
    96 
     98...
    9799[irclogs]
    98100channel = #trac
     
    100102}}}
    101103
    102 === Verbose Config ===
     104=== Verbose Configuration
    103105
    104106Here is an example with a lot more options set.
    105107
    106 {{{
     108{{{#!ini
    107109[irclogs]
    108110channel = #trac
     
    117119}}}
    118120
    119 === DB Config ===
    120 
    121 The database should take a standard trac db connection string.  If none is specified, then the trac db will be used as the default.  The database must contain a table with the following columns (time, network, target, nick, type, message).  It is suggested that indexes are put on the time, (network, target) sets.  target is usually the channel name.
    122 
    123 {{{
     121=== Database Configuration
     122
     123The database should take a standard Trac db connection string. If none is specified, then the Trac db will be used as the default. The database must contain a table with the following columns (time, network, target, nick, type, message). It is suggested that indexes are put on the time, (network, target) sets. Target is usually the channel name.
     124
     125{{{#!ini
    124126[irclogs]
    125127provider = db
     
    129131}}}
    130132
    131 === Multi Channel Config ===
    132 
    133 IrcLogPlugin now supports mutliple channels.  Simple setup new channel options with the channel.$channel-name prefix.  channel-name can be anything you like. Each channel will 'inherit' any unspecified options from the 'default' set of options.
    134 
    135 {{{
     133=== Multi Channel Configuration
     134
     135IrcLogPlugin now supports mutliple channels. Simple setup new channel options with the channel.$channel-name prefix. channel-name can be anything you like. Each channel will 'inherit' any unspecified options from the 'default' set of options.
     136
     137{{{#!ini
    136138[irclogs]
    137139channel.gozer.channel = #dunkbots
     
    143145}}}
    144146
    145 === Adding New File Formats ===
    146 
    147 The simplest way is to create a ticket and let me do it ;).  But any help is much appreciated.  A file format basically consists of file paths, regexes to parse lines, and order to try regexes in.  match_order is the order the regexes will be matched in.  The first part of the name will be matched to match_order.  the match order value will also be used as the type.  It is possible to add new types by having new regexes, but make sure there is a message positional regex group or things could go haywire.  The timestamp regex is seperate for convenience.  The timestamp format is used to parse the timestamp into a datetime.  Here is an example for gozer (already provided by default).:
     147=== Adding New File Formats
     148
     149A file format basically consists of file paths, regexes to parse lines, and order to try regexes in. match_order is the order the regexes will be matched in. The first part of the name will be matched to match_order. The match order value will also be used as the type. It is possible to add new types by having new regexes, but make sure there is a message positional regex group or things could go haywire. The timestamp regex is separate for convenience. The timestamp format is used to parse the timestamp into a datetime. Here is an example for gozer (already provided by default):
    148150
    149151{{{
     
    166168}}}
    167169
    168 == Wiki Macros 0.11 ==
    169 
    170 === Quote ===
     170== Wiki Macros 0.11
     171
     172=== Quote
    171173
    172174Show conversation excerpts from IRC logs:
     
    177179This macro takes two arguments: a UTC date formatted to ''UTCYYYY-MM-DDTHH:MM:SS'', and (optional) the number of lines to display relative to the first message. 
    178180
    179 === Trac Links ===
     181=== Trac Links
    180182
    181183Link to an IRC conversation:
     
    184186}}}
    185187
    186 === "Live" Log ===
     188=== "Live" Log
    187189
    188190Show a "live" AJAX log display.  '''Note:''' This macro should be used sparingly; it should not be on the front page of a project in most cases.
     
    191193}}}
    192194
    193 == Wiki Macros Beta ==
    194 
    195 === Trac Links ===
     195== Wiki Macros Beta
     196
     197=== Trac Links
    196198
    197199Link to an IRC conversation:
     
    201203}}}
    202204
    203 The format is (channel)-(timestamp).  For the default channel, simply use timestamp.  Timestamp is UTC date formatted to ''UTCYYYY-MM-DDTHH:MM:SS''.
    204 
    205 === Quote ===
     205The format is (channel)-(timestamp).  For the default channel, simply use timestamp. Timestamp is UTC date formatted to ''UTCYYYY-MM-DDTHH:MM:SS''.
     206
     207=== Quote
    206208
    207209Show conversation excerpts from IRC logs:
     
    211213channel is the default channel if none is specified. ''There may not be a default channel setup though.''
    212214
    213 UTC date formatted to ''UTCYYYY-MM-DDTHH:MM:SS'', and (optional) offset, number so seconds to display.
    214 
    215 === "Live" Log ===
    216 
    217 Show a "live" AJAX log display.  '''Note:''' This macro should be used sparingly; it should not be on the front page of a project in most cases.
     215UTC date formatted to ''UTCYYYY-MM-DDTHH:MM:SS'', and (optional) offset, number of seconds to display.
     216
     217=== "Live" Log
     218
     219Show a "live" AJAX log display:
    218220{{{
    219221[[IrcLogLive]]
    220222}}}
    221 This macro optionally takes three arguments: poll_frequency (default is 60), count (default is 10) and channel (default is default).
     223
     224'''Note:''' This macro should be used sparingly; it should not be on the front page of a project in most cases.
     225
     226This macro optionally takes three arguments: poll_frequency (default is 60), count (default is 10) and channel (default is default):
    222227
    223228{{{
     
    225230}}}
    226231
    227 == Recent Changes ==
     232== Recent Changes
    228233
    229234[[ChangeLog(irclogsplugin, 3)]]
    230235
    231 == Author/Contributors ==
     236== Author/Contributors
    232237
    233238'''Author:''' [wiki:mitsuhiko] [[BR]]
    234 '''Maintainer:''' [wiki:doki_pen][[br]]
     239'''Maintainer:''' [[Maintainer]] [[BR]]
    235240'''Contributors:''' [wiki:pacopablo], [wiki:jgoldberg]
    236241
    237 == Comments ==
     242== Comments
     243
    238244{{{
    239245[23:42] <Rica|Coding> Someone know the IRCLogs plugin ?