How to Quickly Produce HTML-Formatted IRC Logs
N a daily basis I must produce logs for 4 IRC channels. Over time I found more efficient ways for doing so and this post summarises some of the shortcuts and tools. It doesn’t go into specifics where these are not generalisable.
The first stage is opening a template for the post/article linking to the log/s. The post has X’s where the data goes, so that part must be completed by hand and then copied and pasted into the right fields. The way this is done depends on the site and its layout, but the important thing is, use templates. If this gets done daily, then a lot of work and many errors can be prevented.
Then comes the point where the logs themselves get produced. Logging is typically done by IRC clients, but only XChat works well for me with the script that I use since 2008, irclog2html. The first thing to do is open all the files containing the relevant logs. In my case it goes like this:
roy@roy:~$ cat ./irc-files.sh kate .xchat2/xchatlogs/FreeNode-#boycottnovell.log .xchat2/xchatlogs/FreeNode-#boycottnovell-social.log .xchat2/xchatlogs/FreeNode-#techbytes.log .xchat2/xchatlogs/FreeNode-#techrights.log
The directory and relative paths may vary and one’s favourite text editor may vary as well (I like Kate). Once all the files are open (about 200 MB in my case), open all the previous logs (if any) and scroll down to the bottom. Then, copy a portion of the last line and search for it in the full log to quickly jump to the latest log line, then extend the selection (highlight with keyboard/mouse) to grab the new log text to be converted into HTML. Once this is done, open a new tab/windows, paste the text, and save the text as a file whose name is corresponding to the channel at hand. In my case, that would be irc-log-social, irc-log-techbytes, irc-log-techrights, and irc-log.
Once all the text to be converted is put in the correctly and consistently named files, batch-run the conversion and open the resultant files in a text editor. For example:
python ./Main/Programs/irclog2html.py irc-log-techrights --title='IRC: #techrights @ FreeNode: January 22nd, 2012' ; python ./Main/Programs/irclog2html.py irc-log --title='IRC: #boycottnovell @ FreeNode: January 22nd, 2012' ; python ./Main/Programs/irclog2html.py irc-log-social --title='IRC: #boycottnovell-social @ FreeNode: January 22nd, 2012' ; python ./Main/Programs/irclog2html.py irc-log-techbytes --title='IRC: #techbytes @ FreeNode: January 22nd, 2012' ; kate irc-log.html irc-log-social.html irc-log-techrights.html irc-log-techbytes.html
This is basically a simple command run about 4 times, then 4 files opened. Python is needed to run irclog2html.py and there is room for some parameters like page titles. The opening of the resultant files then makes it possible to save under date-stamped files all the logs separately, then upload them and link to them in the template post. That’s about it. If there are any questions about these very basic efficiency tricks, drop me a line. Having published thousands of logs, it is an area I’m quite familiar with.






Filed under: 

S SOMEONE who has worked from home since 2006 I can gladly say that motor vehicles are possible to avoid for those who wish to and whose work is location-independent. Spare office space too can be discarded. Both removals would be beneficial to the environment and reduce the impact of overpopulation.
N the middle of last year I found myself with an extra new widescreen monitor that could not be used because my graphics card only supports up to two monitors. I pondered buying a new graphics card to add a third or fourth monitor to the same box, but this turned out to be uneconomic. So instead I bought an extra box and installed Debian Squeeze on it. It would add a processor to my setup and also help stay connected when either of the machine requires downtime. Over time I learned how to properly use this “helper box”, which is connected to a separate mouse and keyboard. It is mostly used for monitoring of information that changes over time.
HAT is all that nonesense that we find in the news about “OpenOffice.org lacking a mail and collaboration” component? Office suites are made to produce files, not to communicate directly with people. The instant messenger and the mail clients might be suitable for integration. The FTP client and the file manager also. But just as the Web browser (page renderer) never belonged next to/inside a file manager, the mail clients (e.g. Thunderbird) should remain separate from tools that are used to put together and manage complex data.
HE “what you see is what you get” paradigm is a fine idea. This term, abbreviated WYSIWYG (and sometimes pronounced Wisi-wig), aptly describes the way we print our documents. From a particular image on our monitor we are able to produce paper replicas. But should the same paradigm be used for composition of our documents? Should layout itself be manipulated and controlled by the user in real time? Scott McNealy
TUDIES which analyse large volumes of communication have always been interesting. For instance, most of the E-mail traffic nowadays is identified as SPAM; and over 80% of it is said to come from compromised Windows PC‘s. However, for a change, this is not what I wish to discuss today. I don’t want to have yet another bite at the effects Windows has on the WWW. It leaves me bitter.