8

I'm using Ubuntu 12.04 LTS and Skype 4.3 on my machine. I've taken a file named main.db from the location on my machine ~/.Skype/SKYPEUSERNAME/

Now I want to see the chat history from that file with each of the contact. For it I installed Sqliteman but I'm still not able to see the chatr history. Can someone please provide me the easiest though effective solution for this issue? Thanks in advance.

PHPLover
  • 1,747
  • 7
  • 23
  • 33
  • 2
    If you want the absolutely easiest way to see your history, check out [www.skypebrowser.com](http://www.skypebrowser.com/). It does exactly that. – Andre Borges Feb 27 '16 at 19:44

1 Answers1

6

Messages are stored as XML in messages table. You may use a simple SQL command to extract need dialog:

sqlite3 .Skype/yourusername/main.db "select timestamp,body_xml from messages where dialog_partner=\"partnerusername\";"

As you may use Sqliteman to run same command:

select timestamp,body_xml from messages where dialog_partner="partnerusername";
user.dz
  • 47,137
  • 13
  • 140
  • 258
  • 4
    instead of `timestamp` use `datetime(timestamp, 'unixepoch') as date`, otherwise +1 as it fixes the bug in the skype client which shows empty history for all contacts – Gabor Apr 09 '15 at 12:41
  • 2
    Also I'd include the `author` field to get a log with proper sender per message – Treviño Dec 04 '15 at 16:58
  • What about chat groups? How can you correctly indentify them? – tigerjack Dec 07 '15 at 11:01
  • 1
    At least on my main.db, the table is Messages (with a capital), not messages (all lower case). I use: sqlite3 -csv main.db "select datetime(timestamp,'unixepoch'),dialog_partner,body_xml from Messages where dialog_partner != \"\";" > Skype_messages.csv – qwa Mar 26 '17 at 20:48
  • 1
    Putting many of the above comments together with my own ideas, I'd use `sqlite3 main.db "select datetime(timestamp, 'unixepoch') as date,author,body_xml from messages where dialog_partner=\"partnerusername\";" > out.txt`. This saves the output in a useful txt file that shows the author's names and gives the date/time in a human-readable format. – J. Mini Jul 18 '21 at 15:46