logparse v0.5, "Dahla Edition" by Ingarath Melforgan (Justin Baugh, baughj at discordians dot net) This is logparse, a simple Perl script for parsing ChatLogger[1] output. logparse is capable of taking in log output after it has been processed by ChatLogger's converter (to extract it from savedvariables.lua). It can then manipulate it in a number of different ways, from processing "sanitized" logs (without party/guild/channel/player messages), useful for producing transcripts of events, to outputting colorized HTML output including all messages you've received. logparse was developed under GNU/Linux, but can be used anywhere a Perl interpreter can be used (i.e. Windows/OS X). If you don't know what a Perl interpreter is, you might consider using the online version of this tool, which can be found at http://deadmemes.net/wow/logparse.php . The online version of logparse has a very easy to use interface where you can simply select a logfile to process (and the online version has all the same features!) logparse, by default, will produce sanitized output (meaning it removes everything but "audible" player speech) in plaintext format. logparse has a number of useful command line options which can control its output: -a, --all Include all messages in the output (implies -cgprwy). -c, --channel Include channel chat in the output. -g, --guild Include guild chat in the output. -h, --help Display this message. -l, --colorize Output colorized HTML output (EXPERIMENTAL). Implies -m. -m, --html Output the parsed log in HTML. -n, --npc Include NPC speech in the output. -o, --ooc Remove whispers which appear to be OOC (in parenthesis). -p, --party Include party chat in the output. -r, --raid Include raid chat in the output. -t, --time Include timestamps in the output. -V, --version Display version information. -w, --whisper Include whispers in the output. -y, --yell Include yells in the output * - Only available if you tell ChatLogger (via its configuration) to produce timestamps. These options can be used together and bundled, so logparse -cgm would produce a log with channel and guild chat included, and output HTML. By default, logparse outputs to standard out (i.e. your console). You can redirect this to a file by doing something similar to: perl logparse mylog.log > mylog.html where might be some of the options mentioned above. logparse also supports outputting to a specified file: perl logparse mylog.log mylog.html mylog.html will contain the parsed log, and logparse will also print statistics. For example, to output colorized HTML to a file, you might do: perl logparse -l Ingarath.log > Ingarath.html substituting the name of your log, obviously. perl logparse -atl Ingarath.log > Ingarath.html would give you a log with all messages plus timestamps, output to colorized HTML. Finally, perl logparse -t Ingarath.log Ingarath.txt would give you a log with only public messages plus timestamps, output to normal text, in the file Ingarath.txt. A QUICK GUIDE ON HOW TO USE THIS CRAZY THING -------------------------------------------- If you're using this under Windows, you'll want to install a Perl interpreter. I would recommend ActivePerl, which is available from ActiveState's website at: http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl If you download the MSI file, you get a fairly easy installation. Accept the defaults and Perl will be installed. Next, unzip the logparse zip to some directory. Now you'll want to start a command prompt (Start->Run->command.com under 95/98, cmd under 2000/XP). Go into the directory you made (cd directory) and then try running logparse by typing: perl logparse The rest should be self-explanatory. If you are having trouble, please use the online version! That's what it's there for. For GNU/Linux or other Unixish platforms, logparse assumes your Perl lives at /usr/bin/perl. You may need to change this to reflect your local reality (look at the top of the script). A FEW NOTES AND WARNINGS ------------------------ Colorized output is EXPERIMENTAL. The reason why it is experimental is because nearly any addon module can write to the chat window. It is not really possible to determine, generally, what looks like module output and what looks like an emote for all possible messages. logparse works on the assumption (a good one, which will work for most people) that anything that isn't captured by previous rules is an emote. However, if you have strange modules, or verbose ones that send text to your chat window, this text may appear to be emotes. Your mileage may vary! This output may be embarrassing if the module reformats whisper text or does something else strange. You would do well to examine the output of logparse if you use colorization before posting it publicly. YOU HAVE BEEN WARNED! If you have chatty modules that appear as emotes, you can help make logparser better by sending me a sample of this output. My goal is to improve logparser so it will ignore the output from the most popular addon modules. Also, please note that OOC filtering is experimental, and may produce undesired results. Currently, only OOC tells are removed (tells that start and end with a parenthesis). If you have any comments, questions, or thoughts, please email them to the address at the top of this file. CHANGING LOGPARSE'S FILTER EXPRESSIONS -------------------------------------- As of version 0.5, logparse reads in regular expressions from a separate text file (regexp-list.txt). If you want certain types of messages included or know enough about regular expressions to add more filters, this file can be modified. Comments and blank lines are ignored by logparse. If you add to the filter, please let me know so that I can add your changes to the master file and give you credit. MODIFYING THE LOOK AND FEEL OF LOGPARSE OUTPUT ---------------------------------------------- Also as of 0.5, logparse supports templated HTML output. There are three main templates: logparse-color.css Contains colorizing information for use when you are outputting colorized HTML. logparse.css Normal styling information for HTML output. logparse.html The main logparse template. Currently, three simple template tags are supported: {%STYLEBLOCK} Will be replaced with logparse / logparse-color.css, depending on your options. {%DATE} Self-explanatory; will be replaced with the current date. {%CHATLOG} Will be replaced with the chat log itself. An HTML fragment is substituted (a complete table). The goal here was to enable simple output to match guild / personal website formats. If you have suggestions for more templating, please let me know. In the future the templates will be much more granular. AND FINALLY, A SHOUT OUT ------------------------ Thanks to Meris for asking me to write this and continually providing suggestions for making it better. ChatLogger is a very useful tool; many thanks to Zlixar for writing it. I hope logparse makes it even more useful.