Revisiting the Colourising Script

My own script had lots of small improvements over the original. At that time, our community would publish logs on Linden Lab’s forums, which used at the time phpBB, and so it formatted the output using BBCode. But sometimes people like me that prefers Human transcription vs speech recognition want to post the transcripts on our own blogs, so HTML formatting was also useful. Our community also started to use TikiWiki for some of the documentation (including transcripts), so I did the formatting for that as well. In fact, the formatting is applied separately, and, in theory, I could easily extend that to include Markdown or other popular formatting syntaxes relatively easily…

It already included a few twists like handling ‘online’ and ‘offline’ messages, which would be deleted by the script, and distinguished between object chat and avatar chat, eliminating the former.

Then the SL Viewer went to several successive changes in the way it produces logs. First, copying logs from in-world produced different results than copying them from the logs saved automatically to disk, so I had to deal with that as well. The SL 2.0 Viewer placed emotes (anything started with /me) in italics, so I wanted to replicate that functionality as well. Here the difficulty was to catch the end of the avatar name. For simplicity’s sake, because all avatar names were of the form FirstName LastName, I did a simplification: separate the whole line into words. Take the second word: if it finishes with a colon, then it was a ‘normal’ chat. If not, then it was an emote, and would be rendered in italics instead. This would also work with things like Gwyneth Llewelyn whispers: I’m so stupid! which would also be rendered in italics, like the SL viewer does, because the colon appears on the third word, not on the second.

| ← Previous | | | Next → |
%d bloggers like this: