Changes between Version 23 and Version 24 of IrcLogsPlugin
- Timestamp:
- Jul 21, 2015, 8:02:27 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
IrcLogsPlugin
v23 v24 1 1 [[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 7 This plugin displays logs of an IRC channel in Trac. 8 9 Key features: 10 * Multi-channel support. 16 11 * 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 27 22 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 28 Existing bugs and feature requests for IrcLogsPlugin are [query:status!=closed&component=IrcLogsPlugin&order=priority here]. 29 30 If 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 32 35 33 36 Download the [download:irclogsplugin zipped source], check out [/svn/irclogsplugin using Subversion], or [source:irclogsplugin browse the source] with Trac. 34 37 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 40 Run "easy_install http://trac-hacks.org/svn/irclogsplugin/0.10/" for 0.10.4 Trac installations (not supported). 41 42 Run "easy_install http://trac-hacks.org/svn/irclogsplugin/0.11/" for 0.11+ Trac installations. 43 44 Run "easy_install http://trac-hacks.org/svn/irclogsplugin/parsing_refactor/" for cutting edge beta version (0.11+ Trac). 45 46 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. 47 48 == Configuration 0.11 49 50 In your `trac.ini file` add these: 51 52 {{{#!ini 53 [components] 54 irclogs.irclogsplugin = enabled 55 ... 56 [irclogs] 57 path = /path/to/log/file/ChannelLogger 58 indexer = builtin:///var/www/trac/indexer/irclogs.idx?cache=true 59 prefix = #roomname 60 }}} 61 62 For 0.11 add this: 63 {{{#!ini 64 [irclogs] 65 path = /path/to/log/file/ChannelLogger 66 indexer = builtin:///var/www/trac/indexer/irclogs.idx?cache=true 67 file_format = #roomname.%Y%m%d.log 68 navigation_button = irclogs 69 }}} 70 71 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): 72 {{{ 73 config supybot.log.timestampformat %Y-%m-%d %H:%M:%S | 74 config supybot.plugins.channellogger true 75 config supybot.plugins.channellogger.directories false 76 config supybot.plugins.channellogger.filenametimestamp %Y%m%d 77 config supybot.plugins.channellogger.rotatelogs true 76 78 }}} 77 79 78 80 The 0.11 version of the plugin expects a different `timestampformat`: 79 81 {{{ 80 81 }}} 82 83 To (re)index your log files, use this [attachment:"indexer.py" pydexter indexing python script]. 82 config supybot.log.timestampformat %Y-%m-%dT%H:%M:%S 83 }}} 84 85 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. 84 86 85 87 '''Note:''' In order to enable indexing for 0.11, you'll currently need a patch, see comment:ticket:1183:6. 86 88 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 93 It 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 94 96 [components] 95 97 irclogs.* = enabled 96 98 ... 97 99 [irclogs] 98 100 channel = #trac … … 100 102 }}} 101 103 102 === Verbose Config ===104 === Verbose Configuration 103 105 104 106 Here is an example with a lot more options set. 105 107 106 {{{ 108 {{{#!ini 107 109 [irclogs] 108 110 channel = #trac … … 117 119 }}} 118 120 119 === D B 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 123 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. 124 125 {{{#!ini 124 126 [irclogs] 125 127 provider = db … … 129 131 }}} 130 132 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 135 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. 136 137 {{{#!ini 136 138 [irclogs] 137 139 channel.gozer.channel = #dunkbots … … 143 145 }}} 144 146 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 149 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 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): 148 150 149 151 {{{ … … 166 168 }}} 167 169 168 == Wiki Macros 0.11 ==169 170 === Quote ===170 == Wiki Macros 0.11 171 172 === Quote 171 173 172 174 Show conversation excerpts from IRC logs: … … 177 179 This 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. 178 180 179 === Trac Links ===181 === Trac Links 180 182 181 183 Link to an IRC conversation: … … 184 186 }}} 185 187 186 === "Live" Log ===188 === "Live" Log 187 189 188 190 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. … … 191 193 }}} 192 194 193 == Wiki Macros Beta ==194 195 === Trac Links ===195 == Wiki Macros Beta 196 197 === Trac Links 196 198 197 199 Link to an IRC conversation: … … 201 203 }}} 202 204 203 The format is (channel)-(timestamp). For the default channel, simply use timestamp. 204 205 === Quote ===205 The 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 206 208 207 209 Show conversation excerpts from IRC logs: … … 211 213 channel is the default channel if none is specified. ''There may not be a default channel setup though.'' 212 214 213 UTC date formatted to ''UTCYYYY-MM-DDTHH:MM:SS'', and (optional) offset, number soseconds 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.215 UTC date formatted to ''UTCYYYY-MM-DDTHH:MM:SS'', and (optional) offset, number of seconds to display. 216 217 === "Live" Log 218 219 Show a "live" AJAX log display: 218 220 {{{ 219 221 [[IrcLogLive]] 220 222 }}} 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 226 This macro optionally takes three arguments: poll_frequency (default is 60), count (default is 10) and channel (default is default): 222 227 223 228 {{{ … … 225 230 }}} 226 231 227 == Recent Changes ==232 == Recent Changes 228 233 229 234 [[ChangeLog(irclogsplugin, 3)]] 230 235 231 == Author/Contributors ==236 == Author/Contributors 232 237 233 238 '''Author:''' [wiki:mitsuhiko] [[BR]] 234 '''Maintainer:''' [ wiki:doki_pen][[br]]239 '''Maintainer:''' [[Maintainer]] [[BR]] 235 240 '''Contributors:''' [wiki:pacopablo], [wiki:jgoldberg] 236 241 237 == Comments == 242 == Comments 243 238 244 {{{ 239 245 [23:42] <Rica|Coding> Someone know the IRCLogs plugin ?