Right, I've had a play with the script, there are a few bugs (for example, if an emoticon was used in a display name, the script can't find email addresses).
I have changed how the output is laid out, this makes Pidgin display the log correctly, but sadly, due to my lack of Java knowledge, I don't know how to make the file name show the date of the conversation, rather than the date of conversion.
Here is the patch that needs to be applied to the Java source XP1 attached:
code:
--- Original.Main.java 2010-10-02 20:10:14.000000000 +0100
+++ Main.java 2010-10-03 12:18:12.084575152 +0100
@@ -253,7 +253,7 @@
//File aFile = new File(fFileName);
- strOutput += "<html><head><title>Conversation with " + strArrayParticipants[1][0] + " at " + dfYearMonthDayTime.format(dateSessionStart) + " on " + strArrayParticipants[0][0] + " (msn)</title></head><body><h3>Conversation with " + strArrayParticipants[1][0] + " at " + dfYearMonthDayTime.format(dateSessionStart) + " on " + strArrayParticipants[0][0] + " (msn)</h3>";
+ strOutput += "<html><head><title>Conversation with " + strArrayParticipants[1][1] + " at " + dfYearMonthDayTime.format(dateSessionStart) + " on " + strArrayParticipants[0][1] + " (msn)</title></head><body><h3>Conversation with " + strArrayParticipants[1][1] + " at " + dfYearMonthDayTime.format(dateSessionStart) + " on " + strArrayParticipants[0][1] + " (msn)</h3>" + "\n";
if (alistContactTimestamp.size() == alistContactName.size() && alistContactTimestamp.size() == alistContactMessage.size()) // If contact timestamp, name, and message are all matching
{
@@ -261,11 +261,11 @@
{
if (strArrayParticipants[0][0].contains(alistContactName.get(i))) // local user
{
- strOutput += "<font color=\"#16569E\"><font size=\"2\">" + dfTimestamp.format(alistContactTimestamp.get(i)) + "</font> <b>" + alistContactName.get(i) + ":</b></font> <font sml=\"MSN\">" + alistContactMessage.get(i) + "</font><br/>";
+ strOutput += "<font color=\"#16569E\"><font size=\"2\">(" + dfTimestamp.format(alistContactTimestamp.get(i)) + ")</font> <b>" + alistContactName.get(i) + ":</b></font> <font sml=\"MSN\">" + alistContactMessage.get(i) + "</font><br/>" + "\n";
}
else
{
- strOutput += "<font color=\"#A82F2F\"><font size=\"2\">" + dfTimestamp.format(alistContactTimestamp.get(i)) + "</font> <b>" + alistContactName.get(i) + ":</b></font> <font sml=\"MSN\"><span style=\"font-family: High Tower Text;\"><strong><span style=\"color: #ff0000;\">" + alistContactMessage.get(i) + "</span></strong></span></font><br/>";
+ strOutput += "<font color=\"#A82F2F\"><font size=\"2\">(" + dfTimestamp.format(alistContactTimestamp.get(i)) + ")</font> <b>" + alistContactName.get(i) + ":</b></font> <font sml=\"MSN\"><span style=\"font-family: High Tower Text;\"><strong><span style=\"color: #ff0000;\">" + alistContactMessage.get(i) + "</span></strong></span></font><br/>" + "\n";
}
}
@@ -535,10 +535,10 @@
private static void writeTextFile(String strFilename, String strFileContent)
{
// Date and Time
- DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh.mm.ss aa");
+ DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd.HHmmss");
Date currentDateTime = new Date();
- strFilename = "Table " + dateFormat.format(currentDateTime) + ".html";
+ strFilename = "" + dateFormat.format(currentDateTime) + ".html";
Writer writerTextFile = null;