Porting ICQ 6 logs to Pidgin.

Heyho! ^^

Do you guys know if and how it is possible to import the ICQ 6 logs to
Pidgin?
Maybe through converting them?

P.


Purpur

Purpur’s Profile: http://forums.opensuse.org/member.php?userid=20078
View this thread: http://forums.opensuse.org/showthread.php?t=405081

POSSIBLE? AND…HOW?
*
C’mon guys… are you dead?* >:)

~~
P.


Purpur

Purpur’s Profile: http://forums.opensuse.org/member.php?userid=20078
View this thread: http://forums.opensuse.org/showthread.php?t=405081

Assuming that both are text files–don’t have an ICQ installation to
know for sure but I’d be surprised if Pidgins weren’t–it should be
possible to convert them with something wipped up in sed and or awk.


yu210148

yu210148’s Profile: http://forums.opensuse.org/member.php?userid=19157
View this thread: http://forums.opensuse.org/showthread.php?t=405081

Thanks. Further instructions are appreciated. :wink:

P.


Purpur

Purpur’s Profile: http://forums.opensuse.org/member.php?userid=20078
View this thread: http://forums.opensuse.org/showthread.php?t=405081

Well, the first thing is to determine the file format of the target
(Pidgin) and how it differs from the file format of the original (ICQ).

Say for example the pidgin format was:

name, connect_time, text
name2, connect_time2, text2
name3, connect_time3, text3
etc…

and the ICQ format was:

connect_time, text, name
connect_time2, text2, name2
connect_time3, text3, name3
etc…

then one could use awk to convert the icq file into the pidgin format
with something like (from the command line):

awk { print $2, print $3, print $1 } icqlogfile.txt >
pidginlogfile.txt

with the numbers above standing for the position that they appear in
the file.

Now, it’s likely that it’s not going to be quite that straight forward.
Say for example that there’s a ‘column’ in the ICQ file that’s not in
the pidgin file. In that case a sed command could be used to strip that
column out of the ICQ file.

Sed relies on regex which can get quite harry to read/write but a
simple example:

Say I wanted to remove the name, name2, name3, etc column from my
example above. It could be done in sed with something like:

sed -f sedscript.sed icqfile.txt > strippedicqfile.txt

where sedscript.sed contains:

s/name*[0-9]//g

the ‘s’ above indicates to sed to substitute the regex pattern match
following the slash with what follows the next slash–in this case
nothing; and the ‘g’ at the end tells sed to do it globally (i.e., for
each occourance and not just the first.)

I found the O’Reily book on sed & awk really useful in figuring all
this out. I think it was just called “Sed & Awk”. Alternatively
there’s lots of web resources on the two programs but if you’re really a
masochist you can type ‘man sed’ and ‘man awk’ at the terminal.


yu210148

yu210148’s Profile: http://forums.opensuse.org/member.php?userid=19157
View this thread: http://forums.opensuse.org/showthread.php?t=405081

Sounds really interesting. Don’t you think there’s a program out there I
could use that makes it “quick 'n dirty”? :wink:

Thanks for stying with me!
P.


Purpur

Purpur’s Profile: http://forums.opensuse.org/member.php?userid=20078
View this thread: http://forums.opensuse.org/showthread.php?t=405081

There may be but if it’s not coming up in a google search for “ICQ
Pidgin Log” or “ICQ Pidgin Log Convert” then it’s likely if one exists
whoever wrote it hasn’t made it available. In which case writing your
own may be the only way to go.

At least until someone who knows a hell of a lot more about it comes
along. :wink:


yu210148

yu210148’s Profile: http://forums.opensuse.org/member.php?userid=19157
View this thread: http://forums.opensuse.org/showthread.php?t=405081

Of course if either of those files are binary (i.e., not editable in a
normal text editor) this won’t work at all.


yu210148

yu210148’s Profile: http://forums.opensuse.org/member.php?userid=19157
View this thread: http://forums.opensuse.org/showthread.php?t=405081

Now here comes the hint: ICQ logs ARE “binary”. ICQ (whoa I litterally
hate that name) saves messages to a file called “user*.mdb*”.

Mh…couldn’t find a thang.


Purpur

Purpur’s Profile: http://forums.opensuse.org/member.php?userid=20078
View this thread: http://forums.opensuse.org/showthread.php?t=405081

Sorry, had to get home from work.

Binary log files huh? Ugg. Well that’s just ridiculous.

Um, well, do you still have ICQ installed somewhere? Or some other way
that you can view the log(s)?

If so, perhaps they could be converted to text with a simple select all
and paste into a text editor like notepad (if on windows). Then save
the file in notepad.


yu210148

yu210148’s Profile: http://forums.opensuse.org/member.php?userid=19157
View this thread: http://forums.opensuse.org/showthread.php?t=405081

Whou… spacy. ^^
*
And then?*


Purpur

Purpur’s Profile: http://forums.opensuse.org/member.php?userid=20078
View this thread: http://forums.opensuse.org/showthread.php?t=405081

Well, then you’ll have a text file version of the ICQ log that can be
edited into the Pidgin format.


yu210148

yu210148’s Profile: http://forums.opensuse.org/member.php?userid=19157
View this thread: http://forums.opensuse.org/showthread.php?t=405081

Well, I’ve been in the chat with pidgin power users today. They’ve told
me, that ICQ should store messages as XML like other messenger do too.
Can’t confirm it. I grabbed the ‘messages.mdb’ and renamed it to
‘messages.xml’.

I now want to try to manually port the file to pidging - but where does
pidgin store its messages and what type of format?

-TM-


Purpur

Purpur’s Profile: http://forums.opensuse.org/member.php?userid=20078
View this thread: http://forums.opensuse.org/showthread.php?t=405081

which should be in ~/purple/logs

Once their in the right format it may be no more complicated then
putting the file(s) in what I would presume is ~/purple/logs/icq. If
pidgin’s handling of ICQ logs is the same as for yahoo or msn


yu210148

yu210148’s Profile: http://forums.opensuse.org/member.php?userid=19157
View this thread: http://forums.opensuse.org/showthread.php?t=405081

sorry that should be ~/.purple NOT ~/purple :slight_smile:


yu210148

yu210148’s Profile: http://forums.opensuse.org/member.php?userid=19157
View this thread: http://forums.opensuse.org/showthread.php?t=405081

Thanks I’ll try that and report back later. I’ve updated your reputation
btw.

Danke.


Purpur

Purpur’s Profile: http://forums.opensuse.org/member.php?userid=20078
View this thread: http://forums.opensuse.org/showthread.php?t=405081

Thanks, good luck.


yu210148

yu210148’s Profile: http://forums.opensuse.org/member.php?userid=19157
View this thread: http://forums.opensuse.org/showthread.php?t=405081

Nope, I was wrong here… Pidgin saves messages in
~/.purple/logs/icq/[icq contact#]/message.html

Messages seem to be named with date and time like:
2009-01-16.194355+0100CET.html

How the heck could I ever possibly port all messages over to pidgin?
I’d be busy for YEARS!

-TM-


Purpur

Purpur’s Profile: http://forums.opensuse.org/member.php?userid=20078
View this thread: http://forums.opensuse.org/showthread.php?t=405081

Ugg (again). Okay, could you post a sample from the ICQ log?


yu210148

yu210148’s Profile: http://forums.opensuse.org/member.php?userid=19157
View this thread: http://forums.opensuse.org/showthread.php?t=405081

It should still be possible to script something though–better to have
the computer do the work than us.


yu210148

yu210148’s Profile: http://forums.opensuse.org/member.php?userid=19157
View this thread: http://forums.opensuse.org/showthread.php?t=405081