Opened 15 years ago

Last modified 6 years ago

#75 new Enhancement

Plain Text Log files

Reported by: Erin Tomson Owned by: timothy
Component: Colloquy (Mac) Version: 2.2 (Mac)
Severity: Normal Keywords: text log transcript xml
Cc:

Description

One big gripe I have, however, is the lack of support for raw text log files. I like to be able to open my log files in TextEdit?, or emacs, or less, or whatever, and to also be able to grep through old log files looking for stuff. The xml format of the log files makes this difficult.

Change History (11)

comment:1 Changed 14 years ago by anonymous

  • Owner changed from timothy to anonymous
  • Status changed from new to assigned

This feature request has come up a few times from users that would like to use grep and/or user other programs to read their transcripts. I have been doing a lot of work on the internal transcript data objects to allow for future formats (like plain text, and CoreData? on Tiger). I haven't started on any of these new implementations, but the framework has been lain.

Other ideas such as a CLI command to parse the transcript into plain text has been proposed as well. A fairly simple XSL transformation could make this happen. I have attached an XSL file to do this, if your interested. If you have xsltproc installed you can output the plain text of a log by doing something like this:

xsltproc /Users/Timothy/Desktop?/plainText.xsl /Users/Timothy?/test.colloquyTranscript

Unfortunately xstlproc doesn't ship with Mac OS X 10.3, however it is available here:
http://www.zveno.com/open_source/libxml2xslt.html

comment:2 Changed 14 years ago by anonymous

  • Owner changed from anonymous to timothy
  • Status changed from assigned to new

comment:3 Changed 13 years ago by rinoa

  • Version changed from 2.0 (2D9) to Latest 2.1

comment:4 follow-up: Changed 13 years ago by Rinoa

Until we add this into the app, you can use a plugin:
Transcript Convertors

comment:5 Changed 13 years ago by FrozenTrout

Unless it has been silently fixed, it seems the transcript convertor chokes on log files over a certain size: http://colloquy.info/project/ticket/1036
The insane xml logging (honestly, does it need to tag emoticons?) is irritating to view the logs outside of the transcript browser (which instantly crashes the app when I try to access it), and results in ridiculously large files. My Colloquy Transcripts folder is 771.3MB right now. Sure, there's a couple years worth of logs, but in those files the XML formatting and tags takes up more space than the actual content.

comment:6 in reply to: ↑ 4 Changed 12 years ago by smsm1

Replying to Rinoa:

Until we add this into the app, you can use a plugin:
Transcript Convertors

The convertor doesn't work when you have some one say something many times, with no one else saying something in between. There is loss of data.

Both http://colloquy.info/extras/details.php?file=70 and http://colloquy.info/extras/details.php?file=54 should be removed until they are fixed.

So for an example (copy and paste):
shaunmcdonald
:
hi
[
14:33
] shaunmcdonald:
does anyone know how to get plain text logs, that actually work
[
14:33
] shaunmcdonald:
as the converters would drop the last line that i just wrote
[
14:34
] shaunmcdonald:
well, everything apart from the first line, until someone else comes in and says something
[
14:34
] shaunmcdonald:
http://colloquy.info/extras/details.php?file=70 and http://colloquy.info/extras/details.php?file=54 should be removed until they are fixed
[
14:35
] shaunmcdonald:
I have had no repsonse when trying to report a problem

Becomes:

[2007-07-18 14::33:11] shaunmcdonald: hi

comment:7 Changed 12 years ago by Rinoa

The plugins not working is an entire new ticket which should be filed with a component of Third Party Plugins. File a ticket specifically saying that they aren't converting all words. Make sure that you have the entire transcript and that it just hasn't saved yet. We will not remove them from the site.

comment:8 follow-up: Changed 10 years ago by CaptSaltyJack

  • priority changed from Normal to High
  • Version changed from 2.1 (Mac) to 2.2 (Mac)

Seriously, no activity on this in two years? I know Colloquy is free and we all appreciate that. But please... plain text logging is such a basic feature in IRC clients. Could you please add this?

comment:9 in reply to: ↑ 8 Changed 10 years ago by jane

  • priority changed from High to Normal

Replying to CaptSaltyJack:

Seriously, no activity on this in two years? I know Colloquy is free and we all appreciate that. But please... plain text logging is such a basic feature in IRC clients. Could you please add this?

Colloquy is open source, not just free, we welcome patches. In the meantime, please check out the Converter app mentioned above, I believe the problem mentioned in this ticket about that plugin has been fixed since.

I know it's been a while since there was last activity on this ticket, but plain text logging loses metadata present in the colloquy transcript xml file, and it's a fairly low priority fix compared to other features/fixes at the moment until it is possible time-wise to fix transcripts in general in the app.

comment:10 Changed 9 years ago by klokan

This command do the conversion job pretty well:

xmlstarlet sel -T -t -m /log/envelope/message -v "concat(@received,'|',../sender,': ',.)" -n filename.colloquyTranscript

or alternative without dates:

xmlstarlet sel -T -t -m /log/envelope/message -v "concat(../sender,': ',.)" -n filename.colloquyTranscript

More details about the XMLStar at http://xmlstar.sourceforge.net/. It runs on Mac without problems.
It is also able to generate XSLT for you, if you need to use it with a different software.

comment:11 Changed 6 years ago by dtp

As a temporary fix, you can set this in your .bashrc

function printchat() { egrep 'sender|message' "$1" | awk -F '">' '{print $2}' | sed ''/\<\\/sender\>/s//`printf "\033[31m_wrote:\033[0m"`/'' | sed 's/\<\/message\>//g' | sed 's/\<\/span\>//' | grep -e "^$" -v; }

Then just call " printchat colloquylogfile " from your log directory.

Note: See TracTickets for help on using tickets.