Adium log format

An instant messenger which can connect to AIM, GTalk, Jabber, ICQ, and more.
Post Reply
Vlcice
Muffin
Posts: 39
Joined: Sun Jan 23, 2005 2:58 am

Adium log format

Post by Vlcice »

I've been taking a look at the logs Adium writes in order to see how to convert my Gaim logs to Adium ones; however, I was wondering a couple of things.

First, do the first three bytes mean anything? I was taking a look at one log, and it starts with three bytes (EF BB BF) before beginning the log itself. If they do, what do they mean?

Secondly, does Adium read inside the logs? In other words, do I need to change the name formatting (with capitals, as Gaim writes) and time formatting (24-hour) to Adium's formatting, or can I safely leave it as it is? As well, I saw a thread a few weeks ago about Adium always writing in 12-hour time - has that been resolved and can Adium write 24-hour time?

Thank you for reading, and I appreciate any answers you may be able to give!
~ Vlčice
User avatar
bgannin
Growl Team
Posts: 1817
Joined: Thu Dec 02, 2004 8:11 am
Location: ..here
Contact:

Post by bgannin »

We already have a gaim log importer in the SVN repository. Why reinvent the wheel? (does it not work?)
Try my software!

#define ADIUMX pimp //by me
#define QUESTION ((2b) || (!2b))
Have you hugged a programmer today?
User avatar
evands
Cocoaforge Admin
Posts: 3152
Joined: Thu Dec 02, 2004 10:55 pm
Location: Decatur, GA
Contact:

Post by evands »

And FYI, the initial bytes are to indicate that it's a UTF8 file.
The duck still burns.
--
My company: Saltatory Software. Check it out :)
Vlcice
Muffin
Posts: 39
Joined: Sun Jan 23, 2005 2:58 am

Post by Vlcice »

Oh, oops. ^.^;; I wasn't aware that there was already a convertor; I hadn't seen anything about it on the Adium website, although I had looked. My apologies, I'll just use that. Thank you for your help!
jmelloy
Latté
Posts: 96
Joined: Thu Dec 02, 2004 6:15 am
Location: Iowa City, IA
Contact:

Post by jmelloy »

The current converter does nothing but rename them to Adium's naming scheme. Our HTML parser opens them, but they still look different.
User avatar
bgannin
Growl Team
Posts: 1817
Joined: Thu Dec 02, 2004 8:11 am
Location: ..here
Contact:

Post by bgannin »

Still a good starting point most likely :)
Try my software!

#define ADIUMX pimp //by me
#define QUESTION ((2b) || (!2b))
Have you hugged a programmer today?
neologism
Harmless
Posts: 6
Joined: Tue Dec 14, 2004 12:16 am
Location: College Station, TX

How to convert

Post by neologism »

I've worked out a couple of quickie grep find/replace strings for use in the free TextWrangler from bare bones. Open up the find/replace dialog box, choose multi-file search (make sure the recursive option is checked in the options button), drag in your gaim logs, make sure the "use grep" button is checked, and run the following 4 find/replace strings:

find 1:

Code: Select all

<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>.*</title></head><body>
replace 1:

Code: Select all

<!-- gaim log export -->\r
find 2:

Code: Select all

\r</body></html>
replace 2:

Code: Select all

\r<!-- end gaim log export -->\r
find 3:

Code: Select all

<font color="#16569E"><font size="2">(.*)</font> <b>(.*)</b></font> <font sml="AIM/ICQ">(.*)</font><br/>\r
replace 3:

Code: Select all

<div class="send"><span class="timestamp">\1</span> <span class="sender">\2</span><pre class="message">\3</pre></div>\r
find 4:

Code: Select all

<font color="#A82F2F"><font size="2">(.*)</font> <b>(.*)</b></font> <font sml="AIM/ICQ"><html><span style='background: #ffffff;'>(.*)</span></span></html></font><br/>\r
replace 4:

Code: Select all

<div class="receive"><span class="timestamp">\1</span> <span class="sender">\2</span><pre class="message">\3</pre></div>\r
find 5:

Code: Select all

<font color="#A82F2F"><font size="2">(.*)</font> <b>(.*)</b></font> <html><span style='font-family: Arial><FONT; font-size: x-small; '><span style='font-size: x-small; '><body>(.*)</body></span></span></html><br/>\r
replace 5:

Code: Select all

<div class="receive"><span class="timestamp">\1</span> <span class="sender">\2</span><pre class="message">\3</pre></div>\r
find 6:

Code: Select all

<font color="#16569E"><font size="2">(.*)</font> <b>(.*)</b></font> <span style='font-size: small; '>(.*)</span><br/>\r
replace 6:

Code: Select all

<div class="send"><span class="timestamp">\1</span> <span class="sender">\2</span><pre class="message">\3</pre></div>\r
find 7:

Code: Select all

<font color="#A82F2F"><font size="2">(.*)</font> <b>(.*)</b></font> <html><span style='background: #ffffff;'>(.*)</span></span></html><br/>\r
replace 5:

Code: Select all

<div class="receive"><span class="timestamp">\1</span> <span class="sender">\2</span><pre class="message">\3</pre></div>\r
hope this helps! it worked great with me

http://trac.adiumx.com/browser/trunk/Ut ... m2adium.pl

EDIT: heh heh this thread was in January '05, not '06. I hope someone finds it useful eventually though...
Post Reply