Bug 109942 - history import export feature
Summary: history import export feature
Status: CONFIRMED
Alias: None
Product: kopete
Classification: Applications
Component: History Plugin (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
: 108305 227349 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-07-31 16:44 UTC by Björn
Modified: 2014-06-25 10:22 UTC (History)
14 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Björn 2005-07-31 16:44:42 UTC
Version:            (using KDE KDE 3.4.1)
Installed from:    Gentoo Packages
Compiler:          GCC 3.4.4 
OS:                Linux

I think a useful feature of the history plugin might be an import- and export-function as it offers Psi with a simple "export..." button in the history window. this way one could import p.e. from gaim or psi histories or export them from kopete (when switching from one client to another or when using kopete on different boxes). Editing directly the log file is quite a lot of work just to have a complete history.
Comment 1 Dominik Schmidt 2005-08-12 21:10:04 UTC
i would really appreciate importing logs especially from centericq, sim and trillian (because i have about 1,5 years of logs in that formats) :)

exporting has a much lower priority IMHO :)
Comment 2 V 2006-02-28 21:48:34 UTC
The ability to import Gaim logs in particular would be terrific, especially since it's used by so many people, even lots of KDE users.
Comment 3 V 2006-02-28 21:49:34 UTC
*** This bug has been confirmed by popular vote. ***
Comment 4 Philip Rodrigues 2006-11-01 18:25:22 UTC
*** Bug 108305 has been marked as a duplicate of this bug. ***
Comment 5 Ashley J Gittins 2007-01-29 04:59:01 UTC
I've just moved from Gaim to Kopete, and a function to import my chat history from Gaim would be fantastic. Even if it was just a script to drag the data in that would be sufficient.

The dupe mentions use of xsltproc to do a conversion manually, but it appears likely to be non-trivial to come up with a solution using that (unless someone else has a clue at hand).
Comment 6 kopeteUSER 2007-03-04 20:02:16 UTC
in bug report 108305, it reads at the beginning: The program you have to use to convert the logs is called "xsltproc" and comes with your libxsl package.

can anyone please elaborate on how to do this? any help would be greatly appreciated!
best regards
Comment 7 Philip Rodrigues 2007-03-05 23:57:07 UTC
kopeteUSER, see "A simple Kopete History->HTML convertor" on this page: http://people.fruitsalad.org/phil/kde/
Comment 8 kopeteUSER 2007-03-07 23:25:49 UTC
thank you for your reply philip. but is there a way "the other way round", that is, to convert gaim logs (html) into kopete-format-logs?
Comment 9 Philip Rodrigues 2007-03-08 00:10:58 UTC
It's certainly possible, and probably quite easy, but I don't have any gaim logs to work on, so I can't do it myself.
Comment 10 kopeteUSER 2007-03-15 12:29:34 UTC
hi philip. unfortunately i do not know anything about programing/coding/scripting, so i believe you that it should be quite easy. if you are interested in helping out, not only me of course ;-) afaik there are many many more who wish for such an option, i would be happy to email you some logs to practice on.

btw: this is my first try to seek help the "direct" way, that is through bug reports/mailing lists. and i am very impressed about how fast there are competent an willing users raising there hands in comparison to numerous "more popular" (e.g. ubuntuforums.org, ubuntuusers.de) message boards.

have a nice day!

marcel
Comment 11 Philip Rodrigues 2007-03-15 19:03:47 UTC
If you can send me some gaim logs as an example, I might have some time to produce something, although I can't promise :-)
Comment 12 kopeteUSER 2007-03-15 20:13:15 UTC
cool. email is out. thank you for everything you can do.
marcel
Comment 13 Michael Schönbeck 2007-07-13 04:05:53 UTC
Philip, are there some advances?
Comment 14 Philip Rodrigues 2007-07-13 21:21:30 UTC
I've taken a look at the gaim log format, and it doesn't seem great as far as converting to kopete log format is concerned - at least, I don't think it can be done easily with XSLT. It'll probably need some Perl or something, which is beyond my abilities, I'm afraid.
Comment 15 Michael Schönbeck 2007-07-27 00:18:04 UTC
would it be an idea to write a plugin for kopete to save logs like pidgin does, or the other way round? I have no idea how complicate it is. Is there a way to donate for special feature requests?
Comment 16 Richard Homonnai 2007-07-27 00:40:06 UTC
I think a plugin storing the messages in the pidgin HTML-format would be quite nice. But I don't think anyone is going to do that^^;
Comment 17 Philip Rodrigues 2007-07-29 22:03:06 UTC
You mean like this?: http://bram85.blogspot.com/2007/07/export-your-kopete-history-to-text-or.html
Comment 18 Michael Schönbeck 2007-07-31 13:47:20 UTC
no, not just an export function, I thought of a bidirectional way.
Comment 19 Dennis Schridde 2007-11-07 19:53:16 UTC
I would like to have at least the export function, too. Possibly with a little bit nicer stylesheet than Brams's (more Kopete-style).
Comment 20 Jonathan 2008-11-23 18:08:27 UTC
I'm using Pidgin at the moment but I'm thinking about changing to Kopete. When I've checked Kopete 3.5 years ago and compared it to Pidgin (back then still named gaim), my decision was for Pidgin. 
But in the last years Kopete has really improved so I would like to use Kopete as my main chat-program.
My Problem is that I have 3.5 years of important chat logs which I definitively don't want to loose. So a way to import my Pidgin logs to Kopete is a must have for me.
Are there any news or some kind of workaround?
Comment 21 Timo Schlüßler 2008-12-05 15:28:54 UTC
I wrote an extension to the kopete history plugin so that you can import the history from pidgin/purple. Until now my code wasn't checked in, but you can try the patches and the code from my email to the kopete-devel mailinglist: http://lists.kde.org/?l=kopete-devel&m=122832025716577&w=2.

Even when nobody told me if my extension works for him, it does a very nice job for me. use it with care and tell me about bugs :)

regards
Comment 22 Matt Rogers 2009-01-11 05:53:39 UTC
SVN commit 909147 by mattr:

Add the ability to import Pidgin logs into Kopete.

Patch by Timo Schlüßler. Thanks!

This will be in KDE 4.3. Please note that this is not a generic history
import feature. It only handles Pidgin logs.
CCBUG: 109942
CCMAIL:timo@schluessler.org



 M  +2 -1      CMakeLists.txt  
 M  +8 -0      historydialog.cpp  
 M  +2 -0      historydialog.h  
 A             historyimport.cpp   [License: GPL (v2+)]
 A             historyimport.h   [License: GPL (v2+)]
 M  +6 -4      historylogger.cpp  
 M  +8 -1      historyviewer.ui  


WebSVN link: http://websvn.kde.org/?view=rev&revision=909147
Comment 23 Unknown 2009-04-20 18:14:47 UTC
Thanks for adding the pidgin import feature. I was thinking of using Kopete, eagerly looking forward to KDE 4.3 !!
Comment 24 Yuriy Kozlov 2009-05-20 20:05:26 UTC
https://bugs.launchpad.net/kdenetwork/+bug/378428 reports that this doesn't quite work right in the beta and provides a patch
Comment 25 Jithin Emmanuel 2009-06-24 13:33:09 UTC
I use kubuntu jaunty kde 4.3 beta 2 . How do I use this function? I cannot find any options in kopete.
Comment 26 Timo Schlüßler 2009-06-24 14:13:13 UTC
(In reply to comment #25)
> I use kubuntu jaunty kde 4.3 beta 2 . How do I use this function? I cannot find
> any options in kopete.

Go to the history viewer dialog (e.g. right-click on a buddy -> view history) and then click on the button in the top which says "import history".

Good luck,
Timo
Comment 27 Grósz Dániel 2009-09-15 18:03:17 UTC
A more general import/export feature would be nice too for backuping history or transfering it from an installation to another.
Comment 28 Timo Schlüßler 2009-09-25 15:38:08 UTC
(In reply to comment #27)
> A more general import/export feature would be nice too for backuping history or
> transfering it from an installation to another.

You could achieve a backup or transfer of different histories very easily through saving, moving or copying kopete's log folder (HOME/.kde/share/apps/kopete/logs).
I don't think that it would be necessary to have such a feature as part of the history plugin. Do you?

Greetings,
Timo
Comment 29 Grósz Dániel 2009-09-25 19:44:47 UTC
I do because you can only expect the most advanced users to find and copy files from Kopete's hidden configuration area by hand while this is a feature which even average users might want.
Comment 30 Timo Schlüßler 2010-03-08 19:07:34 UTC
(In reply to comment #24)
> https://bugs.launchpad.net/kdenetwork/+bug/378428 reports that this doesn't
> quite work right in the beta and provides a patch

That problem is now fixed in kopete-svn too.
Comment 31 Tristan Miller 2010-10-08 12:52:19 UTC
The link in Comment #17 no longer works.  The new URL for the Kopete history to HTML/text converter is http://www.bramschoenmakers.nl/en/node/136
Comment 32 Juan Luis Baptiste 2010-11-02 18:01:30 UTC
This isn't working with kopete from KDE 4.5.2. When trying to import the history for one of my contacts I get an error window with title "Cannot Map Nickname to Account", and asking me which was my nickname on that history, but it starts to show random contacts from my list. For example, trying with a MSN contact, on the details text I see the following error:

WARNING: Cannot find matching account for xxxxx@hotmail.com (msn).

Doing some testing, it seems the problem is with the name of the protocol directory on pidgin logs. For example, for MSN protocol, on ~/.purple/logs the directory is named "msn", but kopete directory on ~/.kde4/share/apps/kopete/logs is "WlmProtocol". If you rename pidgin's msn directory to "WlmProtocol" and then try to import the logs on kopete, the import process won't fail and it will start asking you which was your nickname on the conversations (which is very annoying btw, but it's a different issue), and apparently, it correctly imports your contacts.

I have other observations about this feature but probably they deserve their own bug report. If so then please tell me and I'll open them:

1. accents and other characters (á, é, í, ó, ñ, etc) appear screwed, there's some encoding issue on the conversion.
2. The import history feature is badly placed: you access it when looking at a contact's history, but when you click on the "import History" it will import all history for all contacts of all accounts (not sure of this last one but it'll surely will do it for all contacts of the contact's protocol). If I'm looking at a contact's history, I expect that that "Import History..." button imports _that_ user history, not the history from all contacts in all accounts. Thsi feature should be moved to kopete's configuration dialog or to the File dialog, bellow the "Export contacts" entry.
3. It's REALLY annoying that the import feature asks hundreds of times which was my nickname on the history logs. I suppose this is because it isn't easy to detect on a pidgin's conversation which contact is from the user importing the history and which one is from the person(s) he was talking to ?
Comment 33 Timo Schlüßler 2011-02-28 03:22:52 UTC
(In reply to comment #32)
> This isn't working with kopete from KDE 4.5.2. When trying to import the
> history for one of my contacts I get an error window with title "Cannot Map
> Nickname to Account", and asking me which was my nickname on that history, but
> it starts to show random contacts from my list. For example, trying with a MSN
> contact, on the details text I see the following error:
> 
> WARNING: Cannot find matching account for xxxxx@hotmail.com (msn).
> 
> Doing some testing, it seems the problem is with the name of the protocol
> directory on pidgin logs. For example, for MSN protocol, on ~/.purple/logs the
> directory is named "msn", but kopete directory on
> ~/.kde4/share/apps/kopete/logs is "WlmProtocol". If you rename pidgin's msn
> directory to "WlmProtocol" and then try to import the logs on kopete, the
> import process won't fail and it will start asking you which was your nickname
> on the conversations (which is very annoying btw, but it's a different issue),
> and apparently, it correctly imports your contacts.

I just submitted a patch to the kopete people that takes different protocol-names into consideration.

> I have other observations about this feature but probably they deserve their
> own bug report. If so then please tell me and I'll open them:
> 
> 1. accents and other characters (á, é, í, ó, ñ, etc) appear screwed, there's
> some encoding issue on the conversion.

Utf-8 is now set as codec for .txt file imports, which should be pidgins default (please alert me if it is not so!).

> 2. The import history feature is badly placed: you access it when looking at a
> contact's history, but when you click on the "import History" it will import
> all history for all contacts of all accounts (not sure of this last one but
> it'll surely will do it for all contacts of the contact's protocol). If I'm
> looking at a contact's history, I expect that that "Import History..." button
> imports _that_ user history, not the history from all contacts in all accounts.
> Thsi feature should be moved to kopete's configuration dialog or to the File
> dialog, bellow the "Export contacts" entry.

I agree. Let's see what the kopete people suggest ...

> 3. It's REALLY annoying that the import feature asks hundreds of times which
> was my nickname on the history logs. I suppose this is because it isn't easy to
> detect on a pidgin's conversation which contact is from the user importing the
> history and which one is from the person(s) he was talking to ?

That's right, only the .html pidgin-log-files contain valuable information about which nicknames are the importers ones.
The patch also contains a new algorithm that should fire much less queries about the used nicknames. Maybe you could test the import once again as soon as the patch made it into the trunk?

Timo
Comment 34 Pali Rohár 2014-06-25 10:22:08 UTC
*** Bug 227349 has been marked as a duplicate of this bug. ***